summaryrefslogtreecommitdiff
path: root/services/os
diff options
context:
space:
mode:
authorJulien Dessaux2017-08-27 23:31:08 +0200
committerJulien Dessaux2017-08-27 23:44:05 +0200
commit5f4f78d55d832d31639119804e7ff9f69ecdda41 (patch)
tree8fccfce99393da540053a5cb35f0ba30e30ec9d5 /services/os
parentAdded nagios server policy (diff)
downloadmasterfiles-5f4f78d55d832d31639119804e7ff9f69ecdda41.tar.gz
masterfiles-5f4f78d55d832d31639119804e7ff9f69ecdda41.tar.bz2
masterfiles-5f4f78d55d832d31639119804e7ff9f69ecdda41.zip
Updated usebundle system to include caller information un report
Diffstat (limited to '')
-rw-r--r--services/os.cf9
-rw-r--r--services/os/debian.cf5
-rw-r--r--services/os/freebsd.cf9
-rw-r--r--services/os/ubuntu.cf5
4 files changed, 17 insertions, 11 deletions
diff --git a/services/os.cf b/services/os.cf
index ee8dc65..25eb203 100644
--- a/services/os.cf
+++ b/services/os.cf
@@ -11,12 +11,9 @@ bundle agent os
{
methods:
debian::
- "any" usebundle => install_package("$(debian.packages)");
- "any" usebundle => debian;
+ "debian" usebundle => debian;
freebsd::
- "any" usebundle => install_package("$(freebsd.packages)");
- "any" usebundle => freebsd;
+ "freebsd" usebundle => freebsd;
ubuntu::
- "any" usebundle => install_package("$(ubuntu.packages)");
- "any" usebundle => ubuntu;
+ "ubuntu" usebundle => ubuntu;
}
diff --git a/services/os/debian.cf b/services/os/debian.cf
index 3d73c2b..48f691d 100644
--- a/services/os/debian.cf
+++ b/services/os/debian.cf
@@ -1,4 +1,4 @@
-bundle common debian
+bundle agent debian
{
vars:
debian::
@@ -50,4 +50,7 @@ bundle common debian
"weechat",
"whois",
};
+ methods:
+ debian::
+ "debian" usebundle => install_package("$(this.bundle)", "$(debian.packages)");
}
diff --git a/services/os/freebsd.cf b/services/os/freebsd.cf
index 7c930db..1029b25 100644
--- a/services/os/freebsd.cf
+++ b/services/os/freebsd.cf
@@ -6,9 +6,12 @@ bundle agent freebsd
"bash",
"ncdu",
};
+ methods:
+ freebsd::
+ "freebsd" usebundle => install_package("$(this.bundle)", "$(freebsd.packages)");
}
-bundle agent add_rc_conf_line(line)
+bundle agent add_rc_conf_line(caller, line)
{
files:
freebsd::
@@ -17,8 +20,8 @@ bundle agent add_rc_conf_line(line)
edit_defaults => std_defs,
perms => system_owned("444"),
edit_line => append_if_no_line("$(line)"),
- classes => if_repaired("freebsd_rc_conf_file_repaired");
+ classes => if_repaired("$(caller)_freebsd_rc_conf_file_repaired");
reports:
any::
- "$(this.bundle): /etc/rc.conf repaired" ifvarclass => "freebsd_rc_conf_file_repaired";
+ "$(caller): /etc/rc.conf repaired" ifvarclass => "$(caller)_freebsd_rc_conf_file_repaired";
}
diff --git a/services/os/ubuntu.cf b/services/os/ubuntu.cf
index 58bd2d5..e3759b1 100644
--- a/services/os/ubuntu.cf
+++ b/services/os/ubuntu.cf
@@ -1,4 +1,4 @@
-bundle common ubuntu
+bundle agent ubuntu
{
vars:
ubuntu::
@@ -50,4 +50,7 @@ bundle common ubuntu
"weechat",
"whois",
};
+ methods:
+ ubuntu::
+ "ubuntu" usebundle => install_package("$(this.bundle)", "$(ubuntu.packages)");
}