From ee51485dce5ca46ee8159c35341374bd927353df Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Wed, 12 Feb 2020 21:50:47 +0100 Subject: site.pp: Make sure cachefilesd class is not called repetitively. --- code/environments/production/manifests/site.pp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'code/environments/production') diff --git a/code/environments/production/manifests/site.pp b/code/environments/production/manifests/site.pp index c257998..43bda37 100644 --- a/code/environments/production/manifests/site.pp +++ b/code/environments/production/manifests/site.pp @@ -122,9 +122,12 @@ class browsers { class cachefilesd { exec { 'modify_cachefilesd': command => "/bin/sed -e 's/#RUN=yes/RUN=yes/g' -i /etc/default/cachefilesd" + unless => "/bin/grep -E '^RUN=yes\$'", } - exec { 'ensure_cachefilesd_enabled': - command => "/bin/systemctl enable cachefilesd.service" + service { 'cachefilesd.service': + provider => systemd, + ensure => running, + enable => true, } } -- cgit v1.2.3