From 32c93c1eebffe7c017e2d34808427defbfaf5337 Mon Sep 17 00:00:00 2001 From: Martin Alfke Date: Fri, 30 Oct 2020 10:55:31 +0100 Subject: [PATCH] switch from contain to include using contain can lead to cyclic dependency errors as contain enforces the class declaration to take place where the contain is mentioned. using include offers more flexibility for puppet to decide when the class really should be declared. fixes a problem at a customer who uses this module --- manifests/automount.pp | 2 +- manifests/mount.pp | 2 +- manifests/service/dropin.pp | 2 +- manifests/sysvwrapper.pp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifests/automount.pp b/manifests/automount.pp index 1e1fd2f..7ef3d67 100644 --- a/manifests/automount.pp +++ b/manifests/automount.pp @@ -29,7 +29,7 @@ # global $ensure = 'present', ) { - contain ::systemd + include ::systemd $mount_name = regsubst(regsubst($where, '/', '-', 'G'), '^-', '', '') diff --git a/manifests/mount.pp b/manifests/mount.pp index 29a0285..e64e2ad 100644 --- a/manifests/mount.pp +++ b/manifests/mount.pp @@ -42,7 +42,7 @@ $ensure = 'present', ) { - contain ::systemd + include ::systemd $mount_name = regsubst(regsubst($where, '/', '-', 'G'), '^-', '', '') diff --git a/manifests/service/dropin.pp b/manifests/service/dropin.pp index edfc532..c578be9 100644 --- a/manifests/service/dropin.pp +++ b/manifests/service/dropin.pp @@ -96,7 +96,7 @@ # } # } - contain ::systemd + include ::systemd $servicename_filtered = regsubst(regsubst(regsubst($servicename, '/', '-', 'G'), '^-', '', ''), '@', '_at_', 'G') diff --git a/manifests/sysvwrapper.pp b/manifests/sysvwrapper.pp index 9d7394d..f440f92 100644 --- a/manifests/sysvwrapper.pp +++ b/manifests/sysvwrapper.pp @@ -6,7 +6,7 @@ $wait_time_on_startup = '1s', $restart = 'no', ) { - contain ::systemd + include ::systemd file { "${initscript}.sysvwrapper.status": ensure => $ensure,