smart_proxy_ansible 3.3.0 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a1934350dedb103c779cdf61196cff80a43751d260fd5f550d26289dc63f388
4
- data.tar.gz: cee72032c8d95fde92021ef8c312e9c4f0408b9ac1d88b5a0ebf9cdd97bc906c
3
+ metadata.gz: 1139197a8fd9b944e4bec3a0dcf1ed18951bffb88457663927ba427ca4f1b372
4
+ data.tar.gz: 0b774027ceedca7a36714f7725704261996efdbfe835f08bcc6fbe6a7beabc22
5
5
  SHA512:
6
- metadata.gz: a473838108c4b9cbcef9da311410a2fda5bc39047a2cd4c623533ef718918583de1c830105b92a52303bfc41e1eeb933f1d4a898380a0cf9b01c32d7fb07cb76
7
- data.tar.gz: cf1aa8ca722850fd39d312cefcbf178e193fcf391ca8058638dd26db01c288f7350ea6c80e5fb004e87cdda664f5200f24b83b61a2dc3226d88006d0efff7cb3
6
+ metadata.gz: 2e5535a4a9d2100e9d68321be99e23b331100e4bb8b2b1e4d7104ab7216064db9f9361c68ac6989fe7197217441fe574087278606c848be65a2362634001d818
7
+ data.tar.gz: 2704d69243f82a099282d5289de914bb754826a9d32a92a93d1ad0c747f512ebe006ac2869554c26616126e3085233a6a166d0670130b8844d0e52e89f4182f5
@@ -34,10 +34,23 @@ module Proxy::Ansible
34
34
  start_ansible_runner
35
35
  end
36
36
 
37
+ def initialize_command(*command)
38
+ r, w = IO.pipe
39
+
40
+ @command_pid = spawn(*command, :out => w, :err => w, :in => '/dev/null')
41
+ @command_out = r
42
+ w.close
43
+ rescue Errno::ENOENT => e
44
+ publish_exception("Error running command '#{command.join(' ')}'", e)
45
+ end
46
+
37
47
  def refresh
38
- return unless super
48
+ super
49
+ @uuid ||= if (f = Dir["#{@root}/artifacts/*"].first)
50
+ File.basename(f)
51
+ end
52
+ return unless @uuid
39
53
  @counter ||= 1
40
- @uuid ||= File.basename(Dir["#{@root}/artifacts/*"].first)
41
54
  job_event_dir = File.join(@root, 'artifacts', @uuid, 'job_events')
42
55
  loop do
43
56
  files = Dir["#{job_event_dir}/*.json"].map do |file|
@@ -24,7 +24,8 @@ module Proxy::Ansible
24
24
  # Discard everything apart from hostname to be able to tell the actions
25
25
  # apart when debugging
26
26
  def transform_input(input)
27
- { 'action_input' => super['action_input'].slice('name', :task_id) }
27
+ action_input = super['action_input']
28
+ { 'action_input' => { 'name' => action_input['name'], :task_id => action_input[:task_id] } }
28
29
  end
29
30
 
30
31
  # def self.input_format
@@ -2,6 +2,6 @@ module Proxy
2
2
  # Version, this allows the proxy and other plugins know
3
3
  # what version of the Ansible plugin is running
4
4
  module Ansible
5
- VERSION = '3.3.0'
5
+ VERSION = '3.3.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smart_proxy_ansible
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Nečas
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-01-17 00:00:00.000000000 Z
12
+ date: 2022-02-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake