summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2017-03-06 10:29:41 +0000
committerJulien Dessaux2017-03-07 21:58:05 +0000
commit700e4335b8e8d585bd531b06ace99abc92dd7f72 (patch)
treebd21a1b681338abf5214055a2aa23240b24d7df1
parentAdded basic ubuntu promises (diff)
downloadmasterfiles-700e4335b8e8d585bd531b06ace99abc92dd7f72.tar.gz
masterfiles-700e4335b8e8d585bd531b06ace99abc92dd7f72.tar.bz2
masterfiles-700e4335b8e8d585bd531b06ace99abc92dd7f72.zip
Fixed email notifications and cosmetic
-rw-r--r--controls/cf_execd.cf2
-rw-r--r--failsafe.cf22
-rw-r--r--update.cf2
3 files changed, 6 insertions, 20 deletions
diff --git a/controls/cf_execd.cf b/controls/cf_execd.cf
index b960be3..ddb9124 100644
--- a/controls/cf_execd.cf
+++ b/controls/cf_execd.cf
@@ -5,6 +5,6 @@ body executor control
exec_command => "$(sys.cf_agent) -Dfrom_cfexecd,cf_execd_initiated -f \"$(sys.failsafe_policy_path)\" ; $(sys.cf_agent) -Dfrom_cfexecd,cf_execd_initiated";
!cfengine_internal_disable_agent_email::
mailto => "root@adyxax.org";
- mailfrom => "cfengine@adyxax.org";
+ mailfrom => "root@adyxax.org";
smtpserver => "10.1.0.254";
}
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
diff --git a/update.cf b/update.cf
index af3bef1..94cd97a 100644
--- a/update.cf
+++ b/update.cf
@@ -5,6 +5,6 @@ body common control
main,
};
inputs => {
- "failsafe.cf",
+ "failsafe.cf",
};
}