summaryrefslogtreecommitdiff
path: root/code/environments/production/modules/certregen/lib/facter
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-02-15 21:47:33 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2022-02-15 21:47:33 +0100
commitc311dea6eb48e9764a787eda315e4d9109e6c255 (patch)
treee2e1d91b7fb14e74bc84d431468d6f99594badf6 /code/environments/production/modules/certregen/lib/facter
parent9002911770331702cf7af1fbeeddeb113d1a1a63 (diff)
downloadpuppet.DEV-c311dea6eb48e9764a787eda315e4d9109e6c255.tar.gz
puppet.DEV-c311dea6eb48e9764a787eda315e4d9109e6c255.tar.bz2
puppet.DEV-c311dea6eb48e9764a787eda315e4d9109e6c255.zip
modules/: Add module certregen.
Diffstat (limited to 'code/environments/production/modules/certregen/lib/facter')
-rw-r--r--code/environments/production/modules/certregen/lib/facter/has_puppet.rb10
-rw-r--r--code/environments/production/modules/certregen/lib/facter/hostcrl.rb4
-rw-r--r--code/environments/production/modules/certregen/lib/facter/localcacert.rb4
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