From 2e3bc1e1ce440580678bade05dec5400123dc043 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 27 Jul 2017 15:07:05 +0200 Subject: Made a generic place for package installations and support a host specific list --- services/common.cf | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'services/common.cf') diff --git a/services/common.cf b/services/common.cf index 8ca7a3d..0e866a0 100644 --- a/services/common.cf +++ b/services/common.cf @@ -1,13 +1,26 @@ bundle agent common { + vars: + any:: + "packages" slist => { + @(distrib.packages), + @(specific.packages), + }; files: any:: "/etc/hosts" edit_defaults => std_defs, perms => system_owned("444"), edit_template => "$(sys.inputdir)/templates/common/hosts", - classes => if_repaired("hosts_repaired"); + classes => if_repaired("common_hosts_files_repaired"); + packages: + debian|ubuntu:: + "$(packages)" + policy => "present", + package_module => apt_get, + classes => if_repaired("common_packages_$(wanted)_add_repaired"); reports: any:: - "$(this.bundle): /etc/hosts repaired" ifvarclass => "hosts_repaired"; + "$(this.bundle): /etc/hosts repaired" ifvarclass => "common_hosts_files_repaired"; + "$(this.bundle): $(wanted) installed" ifvarclass => "common_packages_$(wanted)_add_repaired"; } -- cgit v1.2.3