From 700e4335b8e8d585bd531b06ace99abc92dd7f72 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Mon, 6 Mar 2017 10:29:41 +0000 Subject: Fixed email notifications and cosmetic --- failsafe.cf | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'failsafe.cf') diff --git a/failsafe.cf b/failsafe.cf index c23942e..7b57c00 100644 --- a/failsafe.cf +++ b/failsafe.cf @@ -17,10 +17,6 @@ bundle agent main { "Fetch Inputs" usebundle => failsafe_update, comment => "We need to fetch policy from upstream if we are bootstrapping or if we are performing failsafe recovery."; - "Actuate Update Policy" - usebundle => failsafe_call_update, - comment => "In order to speed up convergence and reporting we trigger the update policy right after initial - bootstrap. This allows the first scheduled run to happen with the most up to date and complete information."; "Report" usebundle => failsafe_report, comment => "It's important to let the user know what happened as the result of the bootstrap or failsafe operation."; @@ -77,31 +73,21 @@ bundle agent failsafe_update { "/bin/systemctl restart cfengine3" classes => failsafe_results("namespace", "systemctl_restart_cfengine3"); } -bundle agent failsafe_call_update -{ - vars: - any:: - "mode" string => ifelse("bootstrap_mode", "bootstrap_mode", "failsafe_mode"); - commands: - any:: - "$(sys.cf_agent) -f $(sys.update_policy_path) --define $(mode)" if => fileexists( $(sys.update_policy_path) ); -} - bundle agent failsafe_report { classes: any:: "have_promises_cf" expression => fileexists("$(sys.inputdir)/promises.cf"); reports: - !bootstrap_mode:: - "Built-in failsafe policy triggered"; +# !bootstrap_mode:: +# "Built-in failsafe policy triggered"; bootstrap_mode:: "Bootstrapping from host '$(sys.policy_hub)' via built-in policy '$(this.promise_filename)'"; bootstrap_mode.policy_server:: "This host assumes the role of policy server"; bootstrap_mode.!policy_server:: "This autonomous node assumes the role of voluntary client"; - inputdir_update_repaired:: - "Updated local policy from policy server"; +# inputdir_update_repaired:: +# "Updated local policy from policy server"; inputdir_update_repaired.!have_promises_cf:: "Failed to copy policy from policy server at $(sys.policy_hub):$(sys.masterdir) Please check -- cgit v1.2.3