foreman_ansible_core 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d8e4d3b45aae22532d3bd304aecedb410387da4
4
- data.tar.gz: 204ba5ebb47a5011a4cff0ef4fd8e6175f1a9d03
3
+ metadata.gz: 12eefd8c004fc5fab3ba89e55d6f55a012fd5a8d
4
+ data.tar.gz: 0f6c6dc40d70761dd0ae7febfbc7e30b19115d07
5
5
  SHA512:
6
- metadata.gz: 415ab2bca277f114eb7bee9d2d5c02ff31b87bd2f661a6e42af603c4a572606cab726cfa4fdfec5400c052c58119c168514d3a6864dcc11d04f63aa480503e00
7
- data.tar.gz: 4e66585515270369b61aeca61b004faa60f6c873db876ecc8ebdf5b4fdc575404404cec87c47a1729b916a34fb3e2d02502dd1883f64b1db022cd478706b588b
6
+ metadata.gz: 283cbd551dba171fccfb7d3dd992a4e4f6c86dbd18f3cd2b1078eba877562c2af3d16457d33808cc4f90a8d4a5ffd95fd47edbff2ac09f3a6c2432e273d8d3f0
7
+ data.tar.gz: d04b049df94c5e507446998d6bb68c6667b3711574276e4544a3dbb27478d0ba1ee4f060f77d317cd61e4e852db96d68d1f716455aeea18a8112bb43eae59a23
@@ -1,4 +1,5 @@
1
1
  require 'foreman_tasks_core'
2
+ require 'foreman_remote_execution_core'
2
3
 
3
4
  # Core actions for Foreman Ansible, used by both Foreman and Foreman proxy
4
5
  # This comprises running playbooks for the moment
@@ -14,15 +15,13 @@ module ForemanAnsibleCore
14
15
  require 'foreman_ansible_core/actions'
15
16
  end
16
17
 
17
- if defined? ForemanRemoteExecutionCore
18
- require 'foreman_remote_execution_core/actions'
19
- require 'foreman_ansible_core/remote_execution_core/ansible_runner'
20
- require 'foreman_ansible_core/remote_execution_core/settings_override'
21
- ForemanRemoteExecutionCore::Actions::RunScript.send(
22
- :prepend,
23
- ForemanAnsibleCore::RemoteExecutionCore::SettingsOverride
24
- )
25
- end
18
+ require 'foreman_remote_execution_core/actions'
19
+ require 'foreman_ansible_core/remote_execution_core/ansible_runner'
20
+ require 'foreman_ansible_core/remote_execution_core/settings_override'
21
+ ForemanRemoteExecutionCore::Actions::RunScript.send(
22
+ :prepend,
23
+ ForemanAnsibleCore::RemoteExecutionCore::SettingsOverride
24
+ )
26
25
 
27
26
  require 'foreman_ansible_core/roles_reader'
28
27
  require 'foreman_ansible_core/version'
@@ -1,43 +1,41 @@
1
- if defined? ::ForemanRemoteExecutionCore
2
- module ForemanAnsibleCore
3
- module RemoteExecutionCore
4
- # Takes an inventory and runs it through REXCore CommandRunner
5
- class AnsibleRunner < ::ForemanTasksCore::Runner::CommandRunner
6
- DEFAULT_REFRESH_INTERVAL = 1
1
+ module ForemanAnsibleCore
2
+ module RemoteExecutionCore
3
+ # Takes an inventory and runs it through REXCore CommandRunner
4
+ class AnsibleRunner < ::ForemanTasksCore::Runner::CommandRunner
5
+ DEFAULT_REFRESH_INTERVAL = 1
7
6
 
8
- def initialize(options)
9
- super(options)
10
- @playbook_runner = ForemanAnsibleCore::PlaybookRunner.new(
11
- options['ansible_inventory'],
12
- options['script'],
13
- options
14
- )
15
- end
7
+ def initialize(options)
8
+ super(options)
9
+ @playbook_runner = ForemanAnsibleCore::PlaybookRunner.new(
10
+ options['ansible_inventory'],
11
+ options['script'],
12
+ options
13
+ )
14
+ end
16
15
 
17
- def start
18
- @playbook_runner.start
19
- rescue StandardError => e
20
- logger.error(
21
- 'error while initalizing command'\
22
- " #{e.class} #{e.message}:\n #{e.backtrace.join("\n")}"
23
- )
24
- publish_exception('Error initializing command', e)
25
- end
16
+ def start
17
+ @playbook_runner.start
18
+ rescue StandardError => e
19
+ logger.error(
20
+ 'error while initalizing command'\
21
+ " #{e.class} #{e.message}:\n #{e.backtrace.join("\n")}"
22
+ )
23
+ publish_exception('Error initializing command', e)
24
+ end
26
25
 
27
- def fill_continuous_output(continuous_output)
28
- delegated_output.fetch('result', []).each do |raw_output|
29
- continuous_output.add_raw_output(raw_output)
30
- end
31
- rescue StandardError => e
32
- continuous_output.add_exception(_('Error loading data from proxy'), e)
26
+ def fill_continuous_output(continuous_output)
27
+ delegated_output.fetch('result', []).each do |raw_output|
28
+ continuous_output.add_raw_output(raw_output)
33
29
  end
30
+ rescue StandardError => e
31
+ continuous_output.add_exception(_('Error loading data from proxy'), e)
32
+ end
34
33
 
35
- def refresh
36
- @command_out = @playbook_runner.command_out
37
- @command_in = @playbook_runner.command_in
38
- @command_pid = @playbook_runner.command_pid
39
- super
40
- end
34
+ def refresh
35
+ @command_out = @playbook_runner.command_out
36
+ @command_in = @playbook_runner.command_in
37
+ @command_pid = @playbook_runner.command_pid
38
+ super
41
39
  end
42
40
  end
43
41
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanAnsibleCore
2
- VERSION = '2.0.1'.freeze
2
+ VERSION = '2.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_ansible_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Lobato Garcia
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  requirements: []
94
94
  rubyforge_project:
95
- rubygems_version: 2.6.12
95
+ rubygems_version: 2.6.14
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: 'Ansible integration with Foreman (theforeman.org): core bits'