summaryrefslogtreecommitdiffstats
path: root/lib/puppet/string/configurer.rb
blob: 257f97e90aca495c55e224289dea5f928afb524f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
require 'puppet/string'

Puppet::String.define(:configurer, '0.0.1') do
  action(:synchronize) do
    when_invoked do |certname, options|
      facts = Puppet::String[:facts, '0.0.1'].find(certname)
      catalog = Puppet::String[:catalog, '0.0.1'].download(certname, facts)
      report = Puppet::String[:catalog, '0.0.1'].apply(catalog)
      report
    end
  end
end