- 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
16 lines
302 B
Ruby
16 lines
302 B
Ruby
# 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
|