Class: Actions::Staypuft::Host::PuppetRun

Inherits:
Dynflow::Action
  • Object
show all
Defined in:
app/lib/actions/staypuft/host/puppet_run.rb

Instance Method Summary collapse

Instance Method Details

#plan(host) ⇒ Object



20
21
22
23
# File 'app/lib/actions/staypuft/host/puppet_run.rb', line 20

def plan(host)
  Type! host, ::Host::Base
  plan_self host_id: host.id, name: host.name
end

#runObject



25
26
27
28
# File 'app/lib/actions/staypuft/host/puppet_run.rb', line 25

def run
  output[:executed_at] = DateTime.now.iso8601
  ::Host.find(input.fetch(:host_id)).puppetrun!
end