From c2b12fe4ffb6aea9e37dc697cbba8cdf51f60fac Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Mon, 4 Aug 2014 09:30:44 +0100 Subject: mga-advisories: Add configuration for running mgaadv in a way which moves packages. This adds an appropriate wrapper script to run the move script as root (which is needed) while keeping the rest running as the mga-advisories user. Disable the cron script for now as we will move over to running the full process but we should test it a bit first. --- modules/mga-advisories/manifests/init.pp | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'modules/mga-advisories/manifests/init.pp') diff --git a/modules/mga-advisories/manifests/init.pp b/modules/mga-advisories/manifests/init.pp index 714e947b..59b3fd4e 100644 --- a/modules/mga-advisories/manifests/init.pp +++ b/modules/mga-advisories/manifests/init.pp @@ -8,6 +8,8 @@ class mga-advisories( $advisories_dir = "${mgaadv_homedir}/advisories" $status_dir = "${mgaadv_homedir}/status" $update_script = '/usr/local/bin/update_mga-advisories' + $move_script = '/root/tmp/mgatools-new/mga-move-pkg' + $move_wrapper_script = '/usr/local/bin/mga-adv-move-pkg' group { $mgaadv_login: ensure => present, @@ -73,12 +75,25 @@ class mga-advisories( content => template('mga-advisories/update_script'), } - cron { $update_script: - command => $update_script, - user => $mgaadv_login, - hour => '*', - minute => '10', - require => Subversion::Snapshot[$advisories_dir], + file { $move_wrapper_script: + ensure => present, + owner => root, + group => root, + mode => '0755', + content => template('mga-advisories/adv-move-pkg'), + } + + sudo::sudoers_config { 'mga-adv-move-pkg': + content => template('mga-advisories/sudoers.adv-move-pkg') } + + # Disable for now... we may re-instate once it's been a little more tested. + #cron { $update_script: + # command => $update_script, + # user => $mgaadv_login, + # hour => '*', + # minute => '10', + # require => Subversion::Snapshot[$advisories_dir], + #} } # vim: sw=2 -- cgit v1.2.1