From 789706f5272a7e49424532d5d27286d259f68bcb Mon Sep 17 00:00:00 2001 From: Bradley Koby Date: Sat, 21 Mar 2020 23:06:31 -0400 Subject: [PATCH] Fix cannot reassign error when before passed via sssd class --- manifests/init.pp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index cb62b28..dce1180 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -145,9 +145,9 @@ if ! empty($service_dependencies) { if $mkhomedir and $manage_oddjobd { - $before = 'Service[oddjobd]' + $_before = ['Service[oddjobd]'] << $before } else { - $before = undef + $_before = $before } ensure_resource('service', $service_dependencies, @@ -156,11 +156,12 @@ hasstatus => true, hasrestart => true, enable => $service_enable, - before => $before, + before => $_before, } ) } + if $mkhomedir and $manage_oddjobd { ensure_resource('service', 'oddjobd', {