summaryrefslogtreecommitdiff
path: root/failsafe.cf
diff options
context:
space:
mode:
authorJulien Dessaux2017-03-06 10:29:41 +0000
committerJulien Dessaux2017-03-07 21:58:05 +0000
commit700e4335b8e8d585bd531b06ace99abc92dd7f72 (patch)
treebd21a1b681338abf5214055a2aa23240b24d7df1 /failsafe.cf
parentAdded basic ubuntu promises (diff)
downloadmasterfiles-700e4335b8e8d585bd531b06ace99abc92dd7f72.tar.gz
masterfiles-700e4335b8e8d585bd531b06ace99abc92dd7f72.tar.bz2
masterfiles-700e4335b8e8d585bd531b06ace99abc92dd7f72.zip
Fixed email notifications and cosmetic
Diffstat (limited to 'failsafe.cf')
-rw-r--r--failsafe.cf22
1 files changed, 4 insertions, 18 deletions
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