diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-10-19 17:55:23 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-10-19 17:55:23 +0200 |
commit | a30a4c6bc158c351474d20b25ab67025aba95b3c (patch) | |
tree | 6024119eb13342d4c5d31c5398b7c21637ec90a6 /manifests | |
parent | fixes (diff) | |
download | periodic-master.tar.gz periodic-master.tar.xz |
File_line just added the rule every time, and since we already include
directories the file shouldn't need to be modified by anyone else.
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/setup.pp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/manifests/setup.pp b/manifests/setup.pp index 360f73f..7da74ed 100644 --- a/manifests/setup.pp +++ b/manifests/setup.pp @@ -15,19 +15,17 @@ class periodic::setup ( String $suffix = '.periodic', Enum['present', 'absent'] $ensure = 'present', ) { + $purge_str = if $purge { '' } else { 'NOT' } $content = @("EOF"/$) + # File managed by puppet + # ${periodic_dir} is currently ${purge_str} in purge mode periodic_conf_files="${periodic_dir}/*${suffix} \${periodic_conf_files}" | EOF - file { '/etc/periodic.conf': - ensure => file, - } - # /etc/perodic.conf is included from /etc/defaults/peroidic.conf - file_line { 'Periodic - Enable sourcing of files in directory': - ensure => $ensure, - path => '/etc/periodic.conf', - line => $content, + file { '/etc/periodic.conf': + ensure => file, + content => $content, } file { $periodic_dir: |