summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
authorJulien Dessaux2017-03-05 19:20:21 +0000
committerJulien Dessaux2017-03-06 09:55:40 +0000
commitdbc1be6b24b5819c5237f83cc00d81bc95398edc (patch)
treec3374a8c51af4bbd7490433d75fe1b33d5982960 /services
parentAdded cfengine_stdlib submodule (diff)
downloadmasterfiles-dbc1be6b24b5819c5237f83cc00d81bc95398edc.tar.gz
masterfiles-dbc1be6b24b5819c5237f83cc00d81bc95398edc.tar.bz2
masterfiles-dbc1be6b24b5819c5237f83cc00d81bc95398edc.zip
Added basic ubuntu promises
Diffstat (limited to 'services')
-rw-r--r--services/main.cf10
-rw-r--r--services/ubuntu.cf53
2 files changed, 56 insertions, 7 deletions
diff --git a/services/main.cf b/services/main.cf
index 5808f31..440d6d2 100644
--- a/services/main.cf
+++ b/services/main.cf
@@ -7,6 +7,9 @@
bundle common classify
{
+ vars:
+ "bundles" slist => { "ubuntu" };
+ "inputs" slist => { "services/ubuntu.cf" };
classes:
any::
"containers" or => {
@@ -15,10 +18,3 @@ bundle common classify
};
"mail_servers" or => { "legend" };
}
-
-bundle agent hello
-{
- reports:
- any::
- "$(this.bundle): hello world";
-}
diff --git a/services/ubuntu.cf b/services/ubuntu.cf
new file mode 100644
index 0000000..13cd3df
--- /dev/null
+++ b/services/ubuntu.cf
@@ -0,0 +1,53 @@
+bundle agent ubuntu
+{
+ vars:
+ ubuntu::
+ "wanted" slist => {
+ "dstat",
+ "git",
+ "htop",
+ "lsb",
+ "mailutils",
+ "ncdu",
+ "socat",
+ "tig",
+ "tmux",
+ "tree",
+ "vim",
+ };
+ ubuntu&!containers::
+ "wanted" slist => {
+ @(wanted),
+ "apt-file",
+ "asciidoc",
+ "build-essential",
+ "cgdb",
+ "cmake",
+ "ethtool",
+ "gpa",
+ "iptstate",
+ "ipvsadm",
+ "lvm2",
+ "mosh",
+ "nmap",
+ "ntpdate",
+ "openntpd",
+ "openssh-server",
+ "needrestart",
+ "pass",
+ "pwgen",
+ "sipcalc",
+ "valgrind",
+ "weechat",
+ "whois",
+ };
+ packages:
+ ubuntu::
+ "$(wanted)"
+ policy => "present",
+ package_module => apt_get,
+ classes => if_repaired("ubuntu_$(wanted)_add_repaired");
+ reports:
+ any::
+ "$(this.bundle): $(wanted) installed" ifvarclass => "ubuntu_$(wanted)_add_repaired";
+}