diff options
author | Julien Dessaux | 2017-03-05 19:20:21 +0000 |
---|---|---|
committer | Julien Dessaux | 2017-03-06 09:55:40 +0000 |
commit | dbc1be6b24b5819c5237f83cc00d81bc95398edc (patch) | |
tree | c3374a8c51af4bbd7490433d75fe1b33d5982960 | |
parent | Added cfengine_stdlib submodule (diff) | |
download | masterfiles-dbc1be6b24b5819c5237f83cc00d81bc95398edc.tar.gz masterfiles-dbc1be6b24b5819c5237f83cc00d81bc95398edc.tar.bz2 masterfiles-dbc1be6b24b5819c5237f83cc00d81bc95398edc.zip |
Added basic ubuntu promises
Diffstat (limited to '')
-rw-r--r-- | promises.cf | 9 | ||||
-rw-r--r-- | services/main.cf | 10 | ||||
-rw-r--r-- | services/ubuntu.cf | 53 |
3 files changed, 61 insertions, 11 deletions
diff --git a/promises.cf b/promises.cf index 89d0369..4295ec9 100644 --- a/promises.cf +++ b/promises.cf @@ -5,12 +5,13 @@ body common control cfengine_controls, cfengine_stdlib, classify, - hello, + @(classify.bundles), }; inputs => { - @(cfengine_controls.inputs), - @(cfengine_stdlib.inputs), - "services/main.cf", + @(cfengine_controls.inputs), + @(cfengine_stdlib.inputs), + "services/main.cf", + @(classify.inputs), }; } 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"; +} |