From 5239846956644f27d1619ce43b742034925d3ebc Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 25 Aug 2017 17:21:05 +0200 Subject: Changed policies organisation to use methods --- services/os/debian.cf | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ services/os/freebsd.cf | 24 +++++++++++++++++++++++ services/os/ubuntu.cf | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 130 insertions(+) create mode 100644 services/os/debian.cf create mode 100644 services/os/freebsd.cf create mode 100644 services/os/ubuntu.cf (limited to 'services/os') diff --git a/services/os/debian.cf b/services/os/debian.cf new file mode 100644 index 0000000..3d73c2b --- /dev/null +++ b/services/os/debian.cf @@ -0,0 +1,53 @@ +bundle common debian +{ + vars: + debian:: + "packages" slist => { + "at", + "bridge-utils", + "check-mk-agent", + "curl", + "dstat", + "git", + "htop", + "iptables", + "mailutils", + "ncdu", + "socat", + "tig", + "tmux", + "tree", + "vim", + "wget", + }; + debian&!containers:: + "packages" slist => { + @(packages), + "ethtool", + "iptstate", + "ipvsadm", + "lvm2", + "mosh", + "nmap", + "ntpdate", + "openntpd", + "openssh-server", + "needrestart", + }; + debian&console_julien:: + "packages" slist => { + @(packages), + "apt-file", + "asciidoc", + "build-essential", + "cgdb", + "cmake", + "gpa", + "pass", + "pwgen", + "sipcalc", + "valgrind", + "weechat", + "whois", + }; +} diff --git a/services/os/freebsd.cf b/services/os/freebsd.cf new file mode 100644 index 0000000..7c930db --- /dev/null +++ b/services/os/freebsd.cf @@ -0,0 +1,24 @@ +bundle agent freebsd +{ + vars: + freebsd:: + "packages" slist => { + "bash", + "ncdu", + }; +} + +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("$(line)"), + classes => if_repaired("freebsd_rc_conf_file_repaired"); + reports: + any:: + "$(this.bundle): /etc/rc.conf repaired" ifvarclass => "freebsd_rc_conf_file_repaired"; +} diff --git a/services/os/ubuntu.cf b/services/os/ubuntu.cf new file mode 100644 index 0000000..58bd2d5 --- /dev/null +++ b/services/os/ubuntu.cf @@ -0,0 +1,53 @@ +bundle common ubuntu +{ + vars: + ubuntu:: + "packages" slist => { + "at", + "bridge-utils", + "check-mk-agent", + "curl", + "dstat", + "git", + "htop", + "iptables", + "mailutils", + "ncdu", + "socat", + "tig", + "tmux", + "tree", + "vim", + "wget", + }; + ubuntu&!containers:: + "packages" slist => { + @(packages), + "ethtool", + "iptstate", + "ipvsadm", + "lvm2", + "mosh", + "nmap", + "ntpdate", + "openntpd", + "openssh-server", + "needrestart", + }; + ubuntu&console_julien:: + "packages" slist => { + @(packages), + "apt-file", + "asciidoc", + "build-essential", + "cgdb", + "cmake", + "gpa", + "pass", + "pwgen", + "sipcalc", + "valgrind", + "weechat", + "whois", + }; +} -- cgit v1.2.3