diff options
author | Julien Dessaux | 2018-03-20 17:01:40 +0100 |
---|---|---|
committer | Julien Dessaux | 2018-03-23 11:39:55 +0100 |
commit | 7f16c07b791755cb938d3851fd990c5f5a995c53 (patch) | |
tree | e6f6877a4b2c16d78d17cbdbf879ab857b504706 /services/os | |
parent | Imported some more openvpn tunnels (diff) | |
download | masterfiles-7f16c07b791755cb938d3851fd990c5f5a995c53.tar.gz masterfiles-7f16c07b791755cb938d3851fd990c5f5a995c53.tar.bz2 masterfiles-7f16c07b791755cb938d3851fd990c5f5a995c53.zip |
Added policy to limit the number of kernels to 2 on centos hosts
Diffstat (limited to '')
-rw-r--r-- | services/os/centos.cf | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/services/os/centos.cf b/services/os/centos.cf index 989fb46..f6673e2 100644 --- a/services/os/centos.cf +++ b/services/os/centos.cf @@ -25,7 +25,17 @@ bundle agent centos "wget", "yum-utils", }; + files: + centos:: + "/etc/yum.conf" + edit_defaults => std_defs, + perms => system_owned("444"), + edit_line => regex_replace(".*installonly_limit=(?!2).*", "installonly_limit=2"), + classes => if_repaired("yum_conf_file_repaired"); methods: centos:: "centos" usebundle => install_package("$(this.bundle)", "$(centos.packages)"); + reports: + any:: + "$(this.bundle): /etc/yum.conf repaired" ifvarclass => "yum_conf_file_repaired"; } |