refacter: renamed facts to libs

This commit is contained in:
2024-02-17 23:03:54 +11:00
parent e10bed689c
commit 1030ba460e
16 changed files with 0 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
# frozen_string_literal: true
# create an enc_role_path fact from enc_role, to be used by hiera.yaml
#
# roles::infra::dns::resolver becomes roles/infra/dns/resolver
Facter.add(:enc_role_path) do
setcode do
enc_role = Facter.value(:enc_role)
if enc_role
enc_role_path = enc_role.gsub('::', '/')
enc_role_path
end
end
end