From 102da120671f339eefd97048c7f6ce6478b55ce0 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Fri, 4 May 2018 12:14:25 +0200 Subject: Bootstrapped inventory system --- services/inventory.cf | 17 +++++++++++++++++ services/main.cf | 8 +++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 services/inventory.cf (limited to 'services') diff --git a/services/inventory.cf b/services/inventory.cf new file mode 100644 index 0000000..93bd580 --- /dev/null +++ b/services/inventory.cf @@ -0,0 +1,17 @@ +bundle agent inventory +{ + files: + any:: + "$(sys.workdir)/inventory/." + create => "true", + perms => system_owned("700"), + classes => if_repaired("inventory_folder_repaired"); + "$(sys.workdir)/inventory/host_info_report" + create => "true", + perms => system_owned("400"), + edit_template => "$(sys.inputdir)/templates/inventory/host_info_report.mustache", + template_method => "mustache"; + reports: + any:: + "$(this.bundle): $(sys.workdir)/inventory folder repaired" ifvarclass => "inventory_folder_repaired"; +} diff --git a/services/main.cf b/services/main.cf index 6a688d4..1305be0 100644 --- a/services/main.cf +++ b/services/main.cf @@ -3,6 +3,7 @@ body file control inputs => { "services/common.cf", "services/applications.cf", + "services/inventory.cf", "services/os.cf", "services/julien.cf", }; @@ -13,12 +14,13 @@ bundle common classify vars: any:: "bundles" slist => { - "common", - "os", - "julien", "bareos_fd", "check_mk", + "common", + "inventory", + "julien", "nrpe", + "os", "sshd", }; classes: -- cgit v1.2.3