From 6535aaa54d141d7605af2a62af5b6b2796af751c Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 24 Jan 2013 18:03:32 +0100 Subject: sudo def for duplicity check --- manifests/nagios_plugin/duplicity.pp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'manifests') diff --git a/manifests/nagios_plugin/duplicity.pp b/manifests/nagios_plugin/duplicity.pp index b88f64c..8be455b 100644 --- a/manifests/nagios_plugin/duplicity.pp +++ b/manifests/nagios_plugin/duplicity.pp @@ -22,7 +22,13 @@ class backupninja::nagios_plugin::duplicity { } nagios::nrpe::command { 'check_backupninja_duplicity': - command_line => "${::nagios::nrpe::nagios_plugin_dir}/check_backupninja_duplicity" + command_line => "sudo {::nagios::nrpe::nagios_plugin_dir}/check_backupninja_duplicity.py" + } + sudo::spec {'nrpe_check_backupninja_duplicity': + ensure => present, + users => 'nagios', + hosts => 'ALL', + commands => "sudo {::nagios::nrpe::nagios_plugin_dir}/check_backupninja_duplicity.py"; } nagios::service { "Backupninja Duplicity $::fqdn": @@ -34,4 +40,6 @@ class backupninja::nagios_plugin::duplicity { # recheck every hour retry_check_interval => '60', } + + } -- cgit v1.2.3