Add entropy_repos fact

This commit is contained in:
2016-10-16 13:42:47 +01:00
parent bd1fd54bbb
commit 97c1cc97e6
3 changed files with 48 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
Facter.add('entropy_repos') do
confine :operatingsystem => :Sabayon
setcode do
# Use the types/providers to do the heavy lifting here
repos = {}
Puppet::Type.type(:entropy_repo).provider(:file).instances().each do |repo|
Facter.debug(repo.enabled)
r = {
:repo_type => repo.repo_type,
:enabled => repo.enabled,
}
repos[repo.name] = r
end
repos
end
end