From 27e083151bfd1e167f810ceb38199ded3d8d8be5 Mon Sep 17 00:00:00 2001 From: Daniel Pittman Date: Thu, 21 Apr 2011 15:45:28 -0700 Subject: (#7181) Rename configurer face to secret_agent. This is a much more useful public name, especially given the code is aimed to eventually replace the agent entirely. Until then this is pleasant enough to talk about. Reviewed-By: Nick Lewis --- lib/puppet/application/configurer.rb | 23 ----------------------- lib/puppet/application/secret_agent.rb | 23 +++++++++++++++++++++++ lib/puppet/face/configurer.rb | 12 ------------ lib/puppet/face/secret_agent.rb | 12 ++++++++++++ 4 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 lib/puppet/application/configurer.rb create mode 100644 lib/puppet/application/secret_agent.rb delete mode 100644 lib/puppet/face/configurer.rb create mode 100644 lib/puppet/face/secret_agent.rb (limited to 'lib/puppet') diff --git a/lib/puppet/application/configurer.rb b/lib/puppet/application/configurer.rb deleted file mode 100644 index 6e86cd2d4..000000000 --- a/lib/puppet/application/configurer.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'puppet/application' -require 'puppet/face' - -class Puppet::Application::Configurer < Puppet::Application - should_parse_config - run_mode :agent - - option("--debug", "-d") - option("--verbose", "-v") - - def setup - if options[:debug] or options[:verbose] - Puppet::Util::Log.level = options[:debug] ? :debug : :info - end - - Puppet::Util::Log.newdestination(:console) - end - - def run_command - report = Puppet::Face[:configurer, '0.0.1'].synchronize(Puppet[:certname]) - Puppet::Face[:report, '0.0.1'].submit(report) - end -end diff --git a/lib/puppet/application/secret_agent.rb b/lib/puppet/application/secret_agent.rb new file mode 100644 index 000000000..d704d14b2 --- /dev/null +++ b/lib/puppet/application/secret_agent.rb @@ -0,0 +1,23 @@ +require 'puppet/application' +require 'puppet/face' + +class Puppet::Application::Secret_agent < Puppet::Application + should_parse_config + run_mode :agent + + option("--debug", "-d") + option("--verbose", "-v") + + def setup + if options[:debug] or options[:verbose] + Puppet::Util::Log.level = options[:debug] ? :debug : :info + end + + Puppet::Util::Log.newdestination(:console) + end + + def run_command + report = Puppet::Face[:secret_agent, '0.0.1'].synchronize(Puppet[:certname]) + Puppet::Face[:report, '0.0.1'].submit(report) + end +end diff --git a/lib/puppet/face/configurer.rb b/lib/puppet/face/configurer.rb deleted file mode 100644 index 74dfb854e..000000000 --- a/lib/puppet/face/configurer.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'puppet/face' - -Puppet::Face.define(:configurer, '0.0.1') do - action(:synchronize) do - when_invoked do |certname, options| - 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 - end - end -end diff --git a/lib/puppet/face/secret_agent.rb b/lib/puppet/face/secret_agent.rb new file mode 100644 index 000000000..e2714122d --- /dev/null +++ b/lib/puppet/face/secret_agent.rb @@ -0,0 +1,12 @@ +require 'puppet/face' + +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) + catalog = Puppet::Face[:catalog, '0.0.1'].download(certname, facts) + report = Puppet::Face[:catalog, '0.0.1'].apply(catalog) + report + end + end +end -- cgit