Skip to content

Instantly share code, notes, and snippets.

View mootpt's full-sized avatar
☀️

Jay Wallace mootpt

☀️
View GitHub Profile
Facter.add(:environment) do
setcode do
if defined? Puppet and Puppet.application_name == :agent
Puppet[:environment]
else
Facter::Util::Resolution.exec('puppet agent --configprint environment')
end
end
end