Skip to content

Instantly share code, notes, and snippets.

@arubdesu
Created December 21, 2015 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arubdesu/759fd06138f6db049a2f to your computer and use it in GitHub Desktop.
Save arubdesu/759fd06138f6db049a2f to your computer and use it in GitHub Desktop.
Puppet facts for munki reporting
Facter.add(:munki_catalog_array) do
confine :kernel => "Darwin"
setcode do
Dir.entries('/Library/Managed Installs/catalogs').select {|f| !File.directory? f}
end
end
Facter.add(:munki_included_manifests) do
confine :kernel => "Darwin"
setcode do
includes = Dir.entries('/Library/Managed Installs/manifests').select {|f| !File.directory? f}
just_relevants = includes - ['SelfServeManifest','client_manifest.plist']
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment