From edc5448aee5dc2372497a4b1a533563e371a81d1 Mon Sep 17 00:00:00 2001 From: Jonathan Zhang Date: Tue, 7 Dec 2021 17:34:37 -0800 Subject: [PATCH 1/6] Update privatefile.pp chattr filename isn't working due to single quotes --- modules/ocf/manifests/privatefile.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ocf/manifests/privatefile.pp b/modules/ocf/manifests/privatefile.pp index 32b388074..3f472a267 100644 --- a/modules/ocf/manifests/privatefile.pp +++ b/modules/ocf/manifests/privatefile.pp @@ -64,13 +64,13 @@ if $immutable { exec { 'chattr -immutable': before => File[$title], - command => 'chattr -i $title', + command => "chattr -i $title", refreshonly => true, } exec { 'chattr +immutable': subscribe => File[$title], - command => 'chattr +i $title', + command => "chattr +i $title", refreshonly => true, } } From b5bc169edd5e400e500845f4b6301e239c8c127d Mon Sep 17 00:00:00 2001 From: Jonathan Zhang Date: Tue, 7 Dec 2021 17:43:11 -0800 Subject: [PATCH 2/6] Update privatefile.pp --- modules/ocf/manifests/privatefile.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ocf/manifests/privatefile.pp b/modules/ocf/manifests/privatefile.pp index 3f472a267..cf74d8d38 100644 --- a/modules/ocf/manifests/privatefile.pp +++ b/modules/ocf/manifests/privatefile.pp @@ -64,13 +64,13 @@ if $immutable { exec { 'chattr -immutable': before => File[$title], - command => "chattr -i $title", + command => "chattr -i ${title}", refreshonly => true, } exec { 'chattr +immutable': subscribe => File[$title], - command => "chattr +i $title", + command => "chattr +i ${title}", refreshonly => true, } } From d8792da8dcbae365b36a6cb97cd918b0ab27ed0b Mon Sep 17 00:00:00 2001 From: Jonathan Zhang Date: Tue, 7 Dec 2021 17:54:02 -0800 Subject: [PATCH 3/6] Update init.pp --- modules/ocf_admin/manifests/init.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ocf_admin/manifests/init.pp b/modules/ocf_admin/manifests/init.pp index cba40ad5d..85e570ec5 100644 --- a/modules/ocf_admin/manifests/init.pp +++ b/modules/ocf_admin/manifests/init.pp @@ -32,7 +32,8 @@ source => 'puppet:///private/passwords', group => ocfroot, mode => '0640', - immutable => true; + immutable => true, + require => Exec['chattr -immutable']; } file { From 6529db97ea493c4db59abee2db61c71b51943491 Mon Sep 17 00:00:00 2001 From: Jonathan Zhang Date: Tue, 7 Dec 2021 17:59:51 -0800 Subject: [PATCH 4/6] Update privatefile.pp --- modules/ocf/manifests/privatefile.pp | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/ocf/manifests/privatefile.pp b/modules/ocf/manifests/privatefile.pp index cf74d8d38..2e9942019 100644 --- a/modules/ocf/manifests/privatefile.pp +++ b/modules/ocf/manifests/privatefile.pp @@ -63,7 +63,6 @@ if $immutable { exec { 'chattr -immutable': - before => File[$title], command => "chattr -i ${title}", refreshonly => true, } From ba04ef81c89ebbdceed12f11e45fb7b94501c0a7 Mon Sep 17 00:00:00 2001 From: Jonathan Zhang Date: Tue, 7 Dec 2021 18:03:33 -0800 Subject: [PATCH 5/6] Update init.pp --- modules/ocf_admin/manifests/init.pp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/ocf_admin/manifests/init.pp b/modules/ocf_admin/manifests/init.pp index 85e570ec5..cba40ad5d 100644 --- a/modules/ocf_admin/manifests/init.pp +++ b/modules/ocf_admin/manifests/init.pp @@ -32,8 +32,7 @@ source => 'puppet:///private/passwords', group => ocfroot, mode => '0640', - immutable => true, - require => Exec['chattr -immutable']; + immutable => true; } file { From 54debc27a3abea68ca25faedbbddc60dac8c79aa Mon Sep 17 00:00:00 2001 From: Jonathan Zhang Date: Tue, 7 Dec 2021 18:06:51 -0800 Subject: [PATCH 6/6] Update privatefile.pp --- modules/ocf/manifests/privatefile.pp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/ocf/manifests/privatefile.pp b/modules/ocf/manifests/privatefile.pp index 2e9942019..be95a7f89 100644 --- a/modules/ocf/manifests/privatefile.pp +++ b/modules/ocf/manifests/privatefile.pp @@ -64,13 +64,14 @@ if $immutable { exec { 'chattr -immutable': command => "chattr -i ${title}", - refreshonly => true, + before => File[$title], + refreshonly => false, } exec { 'chattr +immutable': subscribe => File[$title], command => "chattr +i ${title}", - refreshonly => true, + refreshonly => false, } } }