diff --git a/lib/smart_proxy_ansible/runner/ansible_runner.rb b/lib/smart_proxy_ansible/runner/ansible_runner.rb index 51302cd..4ba15a0 100644 --- a/lib/smart_proxy_ansible/runner/ansible_runner.rb +++ b/lib/smart_proxy_ansible/runner/ansible_runner.rb @@ -127,7 +127,7 @@ def hostname_for_event(event) def handle_host_event(hostname, event) log_event("for host: #{hostname.inspect}", event) - publish_data_for(hostname, event['stdout'] + "\n", 'stdout') if event['stdout'] + publish_data_for(hostname, event['stdout'] + "\n", 'stdout', id: event['uuid'], timestamp: event['created']) if event['stdout'] case event['event'] when 'runner_on_ok' publish_exit_status_for(hostname, 0) if @exit_statuses[hostname].nil? @@ -153,11 +153,11 @@ def handle_broadcast_data(event) host = inventory_hosts.find { |host| row =~ /#{host}/ } line = row + "\n" unless host - broadcast_data(line, 'stdout') + broadcast_data(line, 'stdout', id: event['uuid'], timestamp: event['created']) next end - publish_data_for(host, line, 'stdout') + publish_data_for(host, line, 'stdout', id: event['uuid'], timestamp: event['created']) # If the task has been rescued, it won't consider a failure if @exit_statuses[host].to_i != 0 && failures[host].to_i <= 0 && unreachable[host].to_i <= 0 && rescued[host].to_i > 0 @@ -165,7 +165,7 @@ def handle_broadcast_data(event) end end else - broadcast_data(event['stdout'] + "\n", 'stdout') + broadcast_data(event['stdout'] + "\n", 'stdout', id: event['uuid'], timestamp: event['created']) end # If the run ends early due to an error - fail all other tasks diff --git a/smart_proxy_ansible.gemspec b/smart_proxy_ansible.gemspec index 431a6c4..433b434 100644 --- a/smart_proxy_ansible.gemspec +++ b/smart_proxy_ansible.gemspec @@ -34,6 +34,6 @@ Gem::Specification.new do |gem| gem.add_development_dependency('logger') gem.add_development_dependency('smart_proxy') gem.add_runtime_dependency('net-ssh') - gem.add_runtime_dependency('smart_proxy_dynflow', '~> 0.8') + gem.add_runtime_dependency('smart_proxy_dynflow', '~> 0.8', '>= 0.10') gem.add_runtime_dependency('smart_proxy_remote_execution_ssh', '~> 0.4') end