diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-02-08 11:59:41 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-02-08 11:59:41 +0100 |
commit | ac7419f50e71c147eb7c60ff69527cb783fc67c4 (patch) | |
tree | a6a55f322a41436582816b9b7dd01bb02737d184 /code/environments/production/modules/certregen/lib/facter | |
parent | 7cc1cd689819df5a9a07aaf08e8278f8b3384839 (diff) | |
download | puppet.KATH-ac7419f50e71c147eb7c60ff69527cb783fc67c4.tar.gz puppet.KATH-ac7419f50e71c147eb7c60ff69527cb783fc67c4.tar.bz2 puppet.KATH-ac7419f50e71c147eb7c60ff69527cb783fc67c4.zip |
Revert "code/environments/production/modules: Drop certregen module again."
This reverts commit 74e2687fa98ea5ba25fbe07c038253d1fc14584e.
Diffstat (limited to 'code/environments/production/modules/certregen/lib/facter')
3 files changed, 18 insertions, 0 deletions
diff --git a/code/environments/production/modules/certregen/lib/facter/has_puppet.rb b/code/environments/production/modules/certregen/lib/facter/has_puppet.rb new file mode 100644 index 0000000..05f2e80 --- /dev/null +++ b/code/environments/production/modules/certregen/lib/facter/has_puppet.rb @@ -0,0 +1,10 @@ +Facter.add(:has_puppet) do + setcode do + begin + require 'puppet' + true + rescue LoadError + false + end + end +end diff --git a/code/environments/production/modules/certregen/lib/facter/hostcrl.rb b/code/environments/production/modules/certregen/lib/facter/hostcrl.rb new file mode 100644 index 0000000..1d69a66 --- /dev/null +++ b/code/environments/production/modules/certregen/lib/facter/hostcrl.rb @@ -0,0 +1,4 @@ +Facter.add(:hostcrl) do + confine :has_puppet => true + setcode { Puppet[:hostcrl] } +end diff --git a/code/environments/production/modules/certregen/lib/facter/localcacert.rb b/code/environments/production/modules/certregen/lib/facter/localcacert.rb new file mode 100644 index 0000000..278ca8b --- /dev/null +++ b/code/environments/production/modules/certregen/lib/facter/localcacert.rb @@ -0,0 +1,4 @@ +Facter.add(:localcacert) do + confine :has_puppet => true + setcode { Puppet[:localcacert] } +end |