diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-08-18 19:26:35 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-08-18 19:26:35 +0200 |
commit | 6667f52e8017065c9b5f14c8025458b38029a800 (patch) | |
tree | 3819efff8336fdda1fef8fc78fd2fbc0791693af /modules/base_installation/lib/puppet/reports/cat_files.rb | |
parent | 19c467dccfd00193a66f1341f068987da7bca14b (diff) | |
parent | 3c90c9020fc4e0257fa4c73f14e609e3559b3771 (diff) | |
download | Puppet-6667f52e8017065c9b5f14c8025458b38029a800.tar.gz Puppet-6667f52e8017065c9b5f14c8025458b38029a800.tar.zst Puppet-6667f52e8017065c9b5f14c8025458b38029a800.zip |
Merge branch 'file_store' into dev
Diffstat (limited to 'modules/base_installation/lib/puppet/reports/cat_files.rb')
-rw-r--r-- | modules/base_installation/lib/puppet/reports/cat_files.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/base_installation/lib/puppet/reports/cat_files.rb b/modules/base_installation/lib/puppet/reports/cat_files.rb new file mode 100644 index 0000000..9d9c068 --- /dev/null +++ b/modules/base_installation/lib/puppet/reports/cat_files.rb | |||
@@ -0,0 +1,17 @@ | |||
1 | require 'puppet' | ||
2 | |||
3 | Puppet::Reports.register_report(:cat_files) do | ||
4 | FOLLOWED_RESOURCES = [ | ||
5 | "File[/etc/puppetlabs/notifies/host_ldap.info]", | ||
6 | ] | ||
7 | |||
8 | def process | ||
9 | self.resource_statuses.each do |name, status| | ||
10 | if FOLLOWED_RESOURCES.include?(status.resource) && status.events.any? { |e| e.status == "success" } | ||
11 | puts File.open(status.title, "r").read() | ||
12 | end | ||
13 | end | ||
14 | end | ||
15 | |||
16 | end | ||
17 | |||