Skip to content

Commit

Permalink
Fix Issue #5: Run delivery token before delivery api so output is onl…
Browse files Browse the repository at this point in the history
…y JSON
  • Loading branch information
andy-dufour committed Feb 1, 2017
1 parent bc7f587 commit 23ef228
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions resources/wf_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,20 @@
ruby_block 'install job runner' do # ~FC014
block do
ENV['AUTOMATE_PASSWORD'] = new_resource.automate_password

Mixlib::ShellOut.new("delivery token \
-s #{new_resource.automate_fqdn} \
-e #{new_resource.automate_enterprise} \
-u #{new_resource.automate_user}").run_command

data = {
hostname: new_resource.name,
os: node['os'],
platform_family: node['platform_family'],
platform: node['platform'],
platform_version: node['platform_version']
}

runner = Mixlib::ShellOut.new("delivery api post runners \
-d '#{data.to_json}' \
-s #{new_resource.automate_fqdn} \
Expand Down

0 comments on commit 23ef228

Please sign in to comment.