From 8d7311b2edeecf976484b51ba694ad03f38ff5a9 Mon Sep 17 00:00:00 2001 From: Yan Zhan Date: Tue, 30 Jan 2024 17:51:43 -0600 Subject: [PATCH] stop puppet from wiping last-run.json; improve dependency chain for setup --- manifests/xdmod_export.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/xdmod_export.pp b/manifests/xdmod_export.pp index a888e66..b960b33 100644 --- a/manifests/xdmod_export.pp +++ b/manifests/xdmod_export.pp @@ -15,14 +15,15 @@ exec { '/usr/bin/python3 -m venv /home/xdmod-ondemand-export/venv': user => 'xdmod-ondemand-export', creates => '/home/xdmod-ondemand-export/venv', + require => Package['httpd'], } - -> exec { 'python3 -m pip install xdmod-ondemand-export': + ~> exec { 'python3 -m pip install xdmod-ondemand-export': path => '/home/xdmod-ondemand-export/venv/bin:/usr/bin:/usr/sbin:/bin', user => 'xdmod-ondemand-export', } - -> exec { '/usr/bin/setfacl -m u:xdmod-ondemand-export:r-x /etc/httpd/logs': } - -> exec { '/usr/bin/setfacl -m u:xdmod-ondemand-export:r-- /etc/httpd/logs/*': } - -> exec { '/usr/bin/setfacl -dm u:xdmod-ondemand-export:r-- /etc/httpd/logs': } + ~> exec { '/usr/bin/setfacl -m u:xdmod-ondemand-export:r-x /etc/httpd/logs': } + ~> exec { '/usr/bin/setfacl -m u:xdmod-ondemand-export:r-- /etc/httpd/logs/*': } + ~> exec { '/usr/bin/setfacl -dm u:xdmod-ondemand-export:r-- /etc/httpd/logs': } file { '/home/xdmod-ondemand-export/conf.ini': ensure => 'file', @@ -41,11 +42,10 @@ } file { '/home/xdmod-ondemand-export/last-run.json': - ensure => 'file', + ensure => 'present', owner => 'xdmod-ondemand-export', group => 'xdmod-ondemand-export', mode => '0600', - content => '', } cron { 'xdmod-ondemand-export':