summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorJulien Dessaux2017-07-25 15:52:45 +0200
committerJulien Dessaux2017-07-25 17:23:26 +0200
commitfae64e791f1dd87d68c712ba4cf44a09b2d545a5 (patch)
tree261b839185b46708ed0e96671139b85c9d128640 /services
parentFixed readme (diff)
downloadmasterfiles-fae64e791f1dd87d68c712ba4cf44a09b2d545a5.tar.gz
masterfiles-fae64e791f1dd87d68c712ba4cf44a09b2d545a5.tar.bz2
masterfiles-fae64e791f1dd87d68c712ba4cf44a09b2d545a5.zip
Added /etc/hosts management
Diffstat (limited to '')
-rw-r--r--services/common.cf13
-rw-r--r--services/main.cf7
2 files changed, 19 insertions, 1 deletions
diff --git a/services/common.cf b/services/common.cf
new file mode 100644
index 0000000..8ca7a3d
--- /dev/null
+++ b/services/common.cf
@@ -0,0 +1,13 @@
+bundle agent common
+{
+ files:
+ any::
+ "/etc/hosts"
+ edit_defaults => std_defs,
+ perms => system_owned("444"),
+ edit_template => "$(sys.inputdir)/templates/common/hosts",
+ classes => if_repaired("hosts_repaired");
+ reports:
+ any::
+ "$(this.bundle): /etc/hosts repaired" ifvarclass => "hosts_repaired";
+}
diff --git a/services/main.cf b/services/main.cf
index a1bea6d..2abefb9 100644
--- a/services/main.cf
+++ b/services/main.cf
@@ -8,8 +8,13 @@
bundle common classify
{
vars:
- "bundles" slist => { "debian", "ubuntu" };
+ "bundles" slist => {
+ "common",
+ "debian",
+ "ubuntu",
+ };
"inputs" slist => {
+ "services/common.cf",
"services/debian.cf",
"services/ubuntu.cf",
};