forked from deric/puppet-zookeeper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue deric#77 - attempt to fathom id automatically
- Loading branch information
Joshua Knarr
authored and
Joshua Knarr
committed
Nov 11, 2016
1 parent
53bba0c
commit 19c8efe
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# add hostid fact | ||
# it grabs the last digits off the hostname to automatically provision services which need | ||
# a host to have some sort of unique serial number | ||
# | ||
Facter.add(:hostid) do | ||
setcode do | ||
hostid = Facter.value(:hostname) | ||
hostid.gsub(/\D/, "") | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters