diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-02-15 21:45:49 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2022-02-15 21:45:49 +0100 |
commit | 8a94d85b6791dd4205a3a5329a56ce4a24809725 (patch) | |
tree | 3004858d335be7122f070f3e86979f56c65f2b7b /code/environments/production/modules/certregen/lib/facter | |
parent | 63b3abd94c2f079ef2d8bc8e789d5e4faee5207c (diff) | |
download | puppet.SGM-8a94d85b6791dd4205a3a5329a56ce4a24809725.tar.gz puppet.SGM-8a94d85b6791dd4205a3a5329a56ce4a24809725.tar.bz2 puppet.SGM-8a94d85b6791dd4205a3a5329a56ce4a24809725.zip |
modules/: Add module certregen.
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 |