lib/marionette/puppet.rb in marionette-0.0.7 vs lib/marionette/puppet.rb in marionette-0.0.8
- old
+ new
@@ -37,13 +37,13 @@
begin
# Execute a puppet run and/or ad hoc system commands
@response = Marshal.load(@response)
- puppet_run if @response[:run][:puppet]
- system_run if @response[:run][:system]
- facter_run if @response[:run][:facter]
+ puppet_run if @response[:run].include? :puppet
+ system_run if @response[:run].include? :system
+ facter_run if @response[:run].include? :facter
rescue
# Catch non-hash responses
puts @response
@@ -82,12 +82,12 @@
# Executes a puppet run
def puppet_run
if @response[:puppet].nil?
- system "puppetd --onetime --no-daemonize"
+ system "puppet agent --server master.headstartapp.com --verbose --waitforcert 5 --no-daemonize --onetime --logdest /var/log/puppet.log"
else
- system "puppetd #{@response[:puppet][:args]}"
+ system "puppet #{@response[:puppet][:args]}"
end
end
# Fetches facts collection