summaryrefslogtreecommitdiff
path: root/services/os
diff options
context:
space:
mode:
authorJulien Dessaux2017-08-25 17:21:05 +0200
committerJulien Dessaux2017-08-25 17:46:13 +0200
commit5239846956644f27d1619ce43b742034925d3ebc (patch)
tree59cc92daa324f03509b26de75587892b59b2f35c /services/os
parentAdded bareos-fd policy (diff)
downloadmasterfiles-5239846956644f27d1619ce43b742034925d3ebc.tar.gz
masterfiles-5239846956644f27d1619ce43b742034925d3ebc.tar.bz2
masterfiles-5239846956644f27d1619ce43b742034925d3ebc.zip
Changed policies organisation to use methods
Diffstat (limited to '')
-rw-r--r--services/os.cf22
-rw-r--r--services/os/debian.cf (renamed from services/debian.cf)2
-rw-r--r--services/os/freebsd.cf (renamed from services/freebsd.cf)12
-rw-r--r--services/os/ubuntu.cf (renamed from services/ubuntu.cf)2
4 files changed, 30 insertions, 8 deletions
diff --git a/services/os.cf b/services/os.cf
new file mode 100644
index 0000000..ee8dc65
--- /dev/null
+++ b/services/os.cf
@@ -0,0 +1,22 @@
+body file control
+{
+ inputs => {
+ "services/os/debian.cf",
+ "services/os/freebsd.cf",
+ "services/os/ubuntu.cf",
+ };
+}
+
+bundle agent os
+{
+ methods:
+ debian::
+ "any" usebundle => install_package("$(debian.packages)");
+ "any" usebundle => debian;
+ freebsd::
+ "any" usebundle => install_package("$(freebsd.packages)");
+ "any" usebundle => freebsd;
+ ubuntu::
+ "any" usebundle => install_package("$(ubuntu.packages)");
+ "any" usebundle => ubuntu;
+}
diff --git a/services/debian.cf b/services/os/debian.cf
index 920816b..3d73c2b 100644
--- a/services/debian.cf
+++ b/services/os/debian.cf
@@ -1,4 +1,4 @@
-bundle common flavour
+bundle common debian
{
vars:
debian::
diff --git a/services/freebsd.cf b/services/os/freebsd.cf
index c83e08f..7c930db 100644
--- a/services/freebsd.cf
+++ b/services/os/freebsd.cf
@@ -1,4 +1,4 @@
-bundle agent flavour
+bundle agent freebsd
{
vars:
freebsd::
@@ -6,17 +6,17 @@ bundle agent flavour
"bash",
"ncdu",
};
- "rc_conf_lines" slist => {
- @(bareos_fd.rc_conf_lines),
- @(check_mk.rc_conf_lines),
- };
+}
+
+bundle agent add_rc_conf_line(line)
+{
files:
freebsd::
"/etc/rc.conf"
create => "true",
edit_defaults => std_defs,
perms => system_owned("444"),
- edit_line => append_if_no_line("$(rc_conf_lines)"),
+ edit_line => append_if_no_line("$(line)"),
classes => if_repaired("freebsd_rc_conf_file_repaired");
reports:
any::
diff --git a/services/ubuntu.cf b/services/os/ubuntu.cf
index 9b711a3..58bd2d5 100644
--- a/services/ubuntu.cf
+++ b/services/os/ubuntu.cf
@@ -1,4 +1,4 @@
-bundle common flavour
+bundle common ubuntu
{
vars:
ubuntu::