diff options
author | Julien Dessaux | 2017-07-31 21:41:28 +0000 |
---|---|---|
committer | Julien Dessaux | 2017-08-04 07:34:34 +0000 |
commit | ad62733781814faf0cbace9d58c4a034f4138b6a (patch) | |
tree | 4dee24662d9d98d02e7dfd9d47df6d33b84b0682 | |
parent | Fixed reporting bug in common package policy (diff) | |
download | masterfiles-ad62733781814faf0cbace9d58c4a034f4138b6a.tar.gz masterfiles-ad62733781814faf0cbace9d58c4a034f4138b6a.tar.bz2 masterfiles-ad62733781814faf0cbace9d58c4a034f4138b6a.zip |
Patched failsafe.cf for freebsd support
Diffstat (limited to '')
-rw-r--r-- | failsafe.cf | 39 | ||||
-rw-r--r-- | services/freebsd.cf | 3 |
2 files changed, 39 insertions, 3 deletions
diff --git a/failsafe.cf b/failsafe.cf index 01d4ee8..daba0fc 100644 --- a/failsafe.cf +++ b/failsafe.cf @@ -14,6 +14,9 @@ bundle agent main { "Check Keys" usebundle => failsafe_checkkeys, comment => "Without a valid keypair we aren't going to be able to establish trust"; + "Copy binaries" + usebundle => failsafe_copy_binaries, + comment => "Not all distributions populate /var/cfengine/bin"; "Fetch Inputs" usebundle => failsafe_update, comment => "We need to fetch policy from upstream if we are bootstrapping or if we are performing failsafe recovery."; @@ -32,6 +35,31 @@ bundle agent failsafe_checkkeys "No public/private key pair is loaded, please create one by running \"cf-key\"" classes => failsafe_results("namespace", "no_ppkeys_ABORT"); } +bundle agent failsafe_copy_binaries +{ + vars: + freebsd:: + "binaries" slist => { + "cf-agent", + "cf-execd", + "cf-key", + "cf-monitord", + "cf-promises", + "cf-runagent", + "cf-serverd", + "cf-upgrade", + }; + files: + freebsd:: + "$(sys.bindir)/$(binaries)" + copy_from => failsafe_cp("/usr/local/sbin/$(binaries)"), + action => failsafe_u_immediate, + classes => failsafe_results("namespace", "copy_binaries"); + reports: + copy_binaries_repaired:: + "cf-engine binaries updated"; +} + bundle agent failsafe_update { vars: any:: @@ -127,6 +155,17 @@ When updating masterfiles, wait (usually 5 minutes) for files to propagate to in } ############################################ +body copy_from failsafe_cp(from) +{ + any:: + source => "$(from)"; + compare => "digest"; + encrypt => "true"; + verify => "true"; + copy_backup => "false"; + purge => "true"; +} +############################################ body copy_from failsafe_scp(from) { any:: diff --git a/services/freebsd.cf b/services/freebsd.cf index 8327832..c6aa8c4 100644 --- a/services/freebsd.cf +++ b/services/freebsd.cf @@ -3,8 +3,5 @@ bundle agent flavour vars: freebsd:: "packages" slist => { - "devel/libstatgrab", - "sysutils/muse", - "sysutils/ipmitool", }; } |