diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2011-03-21 16:15:33 -0700 |
|---|---|---|
| committer | Nick Lewis <nick@puppetlabs.com> | 2011-03-21 16:15:33 -0700 |
| commit | 0f4a4300f18da04fc672475645c0d2ba9721d1d5 (patch) | |
| tree | 2826d47842e8d1dcd30dd08a16fa4c29c2ccb23c /lib/puppet/application | |
| parent | 84ba21e66660a67e20c1194780138317e6a39d49 (diff) | |
| parent | 63f33d078429a9f589474f9c0778b21d82f38682 (diff) | |
Merge branch 'ticket/master/6805'
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | lib/puppet/application/configurer.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/puppet/application/configurer.rb b/lib/puppet/application/configurer.rb new file mode 100644 index 000000000..70d24814e --- /dev/null +++ b/lib/puppet/application/configurer.rb @@ -0,0 +1,23 @@ +require 'puppet/application' +require 'puppet/interface' + +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::Interface::Configurer.synchronize(Puppet[:certname]) + Puppet::Interface::Report.submit(report) + end +end |
