feat: automatically generate vault certs
- certificate will be generated for: - fqdn - hostname - primary ip address - localhost - 127.0.0.1 - update base profile to generate vault certificate for all - create facts for use with vault_certs
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# lib/facter/vault_cert_altnames.rb
|
||||
require 'puppet'
|
||||
|
||||
Facter.add('vault_cert_altnames') do
|
||||
setcode do
|
||||
alt_names_file = '/etc/pki/tls/vault/alt_names'
|
||||
if File.exist?(alt_names_file)
|
||||
File.read(alt_names_file).split("\n")
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user