blob: 751e6b4d7de98ef718b3381cf01d206f20276652 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
require 'puppet/application'
require 'puppet/faces'
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::Faces[:configurer, '0.0.1'].synchronize(Puppet[:certname])
Puppet::Faces[:report, '0.0.1'].submit(report)
end
end
|