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
+15
View File
@@ -0,0 +1,15 @@
# frozen_string_literal: true
# split the enc_role fact into different tiers
#
# e.g.
# enc_role_tier2: roles::infra::dns::resolver -> infra
Facter.add(:enc_role_tier1) do
setcode do
role = Facter.value(:enc_role)
if role
parts = role.split('::')
parts[1] if parts.size > 1
end
end
end