diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-21 17:36:52 -0700 |
|---|---|---|
| committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-21 17:36:52 -0700 |
| commit | dc378c024a08c2b989297ad2f8ed50830baf0dcf (patch) | |
| tree | 9cc473d5b9658ba5450a9a3d1f957a6a997db73d | |
| parent | 7591de7e4ef20726a9a174ec8728bec4119d751c (diff) | |
| parent | c7a0270b872f533c5ba6187b9202a23f9ae8ab23 (diff) | |
| download | puppet-dc378c024a08c2b989297ad2f8ed50830baf0dcf.tar.gz puppet-dc378c024a08c2b989297ad2f8ed50830baf0dcf.tar.xz puppet-dc378c024a08c2b989297ad2f8ed50830baf0dcf.zip | |
Merge branch 'bug/2.7.x/7121-the-'configurer'-face-should-download-plugins-and-send-reports' into 2.7.x
| -rw-r--r-- | lib/puppet/face/plugin.rb | 16 | ||||
| -rw-r--r-- | lib/puppet/face/secret_agent.rb | 11 |
2 files changed, 24 insertions, 3 deletions
diff --git a/lib/puppet/face/plugin.rb b/lib/puppet/face/plugin.rb new file mode 100644 index 000000000..4d95bd93b --- /dev/null +++ b/lib/puppet/face/plugin.rb @@ -0,0 +1,16 @@ +require 'puppet/face' +Puppet::Face.define(:plugin, '0.0.1') do + summary "Interact with the Puppet plugin system" + + action :download do + summary "Download plugins from the configured master" + + when_invoked do |options| + require 'puppet/configurer/downloader' + Puppet::Configurer::Downloader.new("plugin", + Puppet[:plugindest], + Puppet[:pluginsource], + Puppet[:pluginsignore]).evaluate + end + end +end diff --git a/lib/puppet/face/secret_agent.rb b/lib/puppet/face/secret_agent.rb index a911467f8..af7ffb7b7 100644 --- a/lib/puppet/face/secret_agent.rb +++ b/lib/puppet/face/secret_agent.rb @@ -5,10 +5,15 @@ Puppet::Face.define(:secret_agent, '0.0.1') do action(:synchronize) do when_invoked do |certname, options| - facts = Puppet::Face[:facts, '0.0.1'].find(certname) + Puppet::Face[:plugin, '0.0.1'].download + + facts = Puppet::Face[:facts, '0.0.1'].find(certname) catalog = Puppet::Face[:catalog, '0.0.1'].download(certname, facts) - report = Puppet::Face[:catalog, '0.0.1'].apply(catalog) - report + report = Puppet::Face[:catalog, '0.0.1'].apply(catalog) + + Puppet::Face[:report, '0.0.1'].submit(report) + + return report end end end |
