Skip to content

Commit

Permalink
location fuck
Browse files Browse the repository at this point in the history
  • Loading branch information
jordiprats committed Oct 16, 2019
1 parent 087caa8 commit 22d7327
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 0.1.22

* added **eypconf_location**

## 0.1.21

* added double empty line at the end of the autobanner file
Expand Down
14 changes: 14 additions & 0 deletions lib/facter/eypconf_location.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
if File.exists?('/opt/eypconf/id/description.sh') then
description = Facter::Util::Resolution.exec('bash /opt/eypconf/id/description.sh').to_s
else
description = Facter::Util::Resolution.exec('bash -c \'if [ -f /opt/eypconf/id/description ]; then cat /opt/eypconf/id/description | paste -sd,; fi\'').to_s
end

unless description.nil? or description.empty?
Facter.add('eypconf_description') do
setcode do
description
end
end

end
File renamed without changes.
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eyp-eyplib",
"version": "0.1.21",
"version": "0.1.22",
"author": "eyp",
"summary": "Utility functions for puppet modules",
"license": "Apache-2.0",
Expand Down

0 comments on commit 22d7327

Please sign in to comment.