Class: Puppet::Network::Handler::Runner

Inherits:
Handler
  • Object
show all
Defined in:
lib/vendor/puppet/network/handler/runner.rb

Overview

A simple server for triggering a new run on a Puppet client.

Instance Method Summary collapse

Instance Method Details

#run(tags = nil, ignoreschedules = false, fg = true, client = nil, clientip = nil) ⇒ Object

Run the client configuration right now, optionally specifying tags and whether to ignore schedules



19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/vendor/puppet/network/handler/runner.rb', line 19

def run(tags = nil, ignoreschedules = false, fg = true, client = nil, clientip = nil)
  options = {}
  options[:tags] = tags if tags
  options[:ignoreschedules] = ignoreschedules if ignoreschedules
  options[:background] = !fg

  runner = Puppet::Run.new(options)

  runner.run

  runner.status
end