summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2017-07-28 14:52:08 +0000
committerJulien Dessaux2017-08-03 13:58:38 +0000
commit835c08c2b01e6b1bd287e5c3267efa9710da39e9 (patch)
tree755c715cb7bb1a9b12ac70890793aab8441b87b1
parentMade a generic place for package installations and support a host specific list (diff)
downloadmasterfiles-835c08c2b01e6b1bd287e5c3267efa9710da39e9.tar.gz
masterfiles-835c08c2b01e6b1bd287e5c3267efa9710da39e9.tar.bz2
masterfiles-835c08c2b01e6b1bd287e5c3267efa9710da39e9.zip
Added freebsd support
-rw-r--r--failsafe.cf2
-rw-r--r--services/common.cf7
-rw-r--r--services/debian.cf2
-rw-r--r--services/freebsd.cf10
-rw-r--r--services/main.cf10
-rw-r--r--services/ubuntu.cf2
-rw-r--r--templates/common/hosts2
7 files changed, 27 insertions, 8 deletions
diff --git a/failsafe.cf b/failsafe.cf
index ba33f7d..01d4ee8 100644
--- a/failsafe.cf
+++ b/failsafe.cf
@@ -81,7 +81,7 @@ bundle agent failsafe_update {
"$(sys.cf_execd)" classes => failsafe_results("namespace", "cf_execd_running");
cf_serverd_not_running::
"$(sys.cf_serverd)" classes => failsafe_results("namespace", "cf_serverd_running");
- !cfengine3_service_running|(systemd.inputdir_update_repaired)::
+ systemd.(!cfengine3_service_running|inputdir_update_repaired)::
"/bin/systemctl restart cfengine3"
contain => failsafe_noshell_and_silent,
classes => failsafe_results("namespace", "systemctl_restart_cfengine3");
diff --git a/services/common.cf b/services/common.cf
index 0e866a0..729ba1a 100644
--- a/services/common.cf
+++ b/services/common.cf
@@ -3,7 +3,7 @@ bundle agent common
vars:
any::
"packages" slist => {
- @(distrib.packages),
+ @(flavour.packages),
@(specific.packages),
};
files:
@@ -19,6 +19,11 @@ bundle agent common
policy => "present",
package_module => apt_get,
classes => if_repaired("common_packages_$(wanted)_add_repaired");
+ freebsd::
+ "$(packages)"
+ policy => "present",
+ package_module => pkg,
+ classes => if_repaired("common_packages_$(wanted)_add_repaired");
reports:
any::
"$(this.bundle): /etc/hosts repaired" ifvarclass => "common_hosts_files_repaired";
diff --git a/services/debian.cf b/services/debian.cf
index 8b250d3..30f09c6 100644
--- a/services/debian.cf
+++ b/services/debian.cf
@@ -1,4 +1,4 @@
-bundle common distrib
+bundle common flavour
{
vars:
debian::
diff --git a/services/freebsd.cf b/services/freebsd.cf
new file mode 100644
index 0000000..8327832
--- /dev/null
+++ b/services/freebsd.cf
@@ -0,0 +1,10 @@
+bundle agent flavour
+{
+ vars:
+ freebsd::
+ "packages" slist => {
+ "devel/libstatgrab",
+ "sysutils/muse",
+ "sysutils/ipmitool",
+ };
+}
diff --git a/services/main.cf b/services/main.cf
index 047e4b1..266cd86 100644
--- a/services/main.cf
+++ b/services/main.cf
@@ -4,16 +4,18 @@ bundle common classify
any::
"bundles" slist => {
"common",
- "distrib",
+ "flavour",
};
"inputs" slist => {
"services/common.cf",
- "services/$(distrib).cf",
+ "services/$(flavour).cf",
};
debian::
- "distrib" string => "debian";
+ "flavour" string => "debian";
+ freebsd::
+ "flavour" string => "freebsd";
ubuntu::
- "distrib" string => "ubuntu";
+ "flavour" string => "ubuntu";
classes:
any::
"containers" or => {
diff --git a/services/ubuntu.cf b/services/ubuntu.cf
index 1f69f82..919a5fe 100644
--- a/services/ubuntu.cf
+++ b/services/ubuntu.cf
@@ -1,4 +1,4 @@
-bundle common distrib
+bundle common flavour
{
vars:
ubuntu::
diff --git a/templates/common/hosts b/templates/common/hosts
index 4d060d8..196ffe2 100644
--- a/templates/common/hosts
+++ b/templates/common/hosts
@@ -19,7 +19,9 @@ ff02::2 ip6-allrouters
10.1.0.206 packages.lxd packages
10.1.0.207 webmail.lxd webmail
10.1.0.208 git.lxd git
+10.1.0.209 ns1
+10.1.0.250 cobsd
10.1.0.251 reality
10.1.0.252 hurricane
10.1.0.253 collab