foreman_ansible 6.1.0 → 6.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/foreman_ansible/ansible_provider.rb +1 -1
- data/lib/foreman_ansible/version.rb +1 -1
- data/test/unit/ansible_provider_test.rb +1 -1
- data/test/unit/lib/foreman_ansible_core/ansible_runner_test.rb +3 -3
- data/test/unit/lib/foreman_ansible_core/playbook_runner_test.rb +3 -3
- data/test/unit/services/inventory_creator_test.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '059c70bd67d597c230eea6135f738afd7c203c27cb1e1d1a7d5b3b88bada984f'
|
4
|
+
data.tar.gz: 2509eb475c69a745d46f726700a5308ee128823f90aaa8e852067b941797141e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 212613afe4068af042fcb9340bddab879afd4c0b7ced2a6748861561cd76ed185609d2582fed69b03af76f7753b83cb5a18923f2d2170480a1deb3e17fb34338
|
7
|
+
data.tar.gz: 4134c4f15af8a5567ddc319978f5c1538e982bc83923d9ba8a1c45a524fb0d7628f236079d6355c9ab5f5d5ca931a85f1bd1c52673efb2ae2e7f2ed8a21d4b9d
|
@@ -40,7 +40,7 @@ class AnsibleProviderTest < ActiveSupport::TestCase
|
|
40
40
|
host.expects(:params).twice.returns(params)
|
41
41
|
secrets = ForemanAnsible::AnsibleProvider.secrets(host)
|
42
42
|
host_secrets = secrets['per-host'][host.name]
|
43
|
-
assert_equal host_secrets['
|
43
|
+
assert_equal host_secrets['ansible_password'], 'password'
|
44
44
|
assert_equal host_secrets['ansible_become_password'], 'letmein'
|
45
45
|
end
|
46
46
|
end
|
@@ -24,7 +24,7 @@ module ForemanAnsibleCore
|
|
24
24
|
'_meta' => { 'hostvars' => { 'foreman.example.com' => {} } } }
|
25
25
|
end
|
26
26
|
let(:input) do
|
27
|
-
host_secrets = { '
|
27
|
+
host_secrets = { 'ansible_password' => 'letmein', 'ansible_become_password' => 'iamroot' }
|
28
28
|
secrets = { 'per-host' => { 'foreman.example.com' => host_secrets } }
|
29
29
|
host_input = { 'input' => { 'action_input' => { 'secrets' => secrets } } }
|
30
30
|
{ 'foreman.example.com' => host_input }
|
@@ -35,14 +35,14 @@ module ForemanAnsibleCore
|
|
35
35
|
test_inventory = inventory.merge('ssh_password' => 'sshpass', 'effective_user_password' => 'mypass')
|
36
36
|
rebuilt = runner.send(:rebuild_secrets, test_inventory, input)
|
37
37
|
host_vars = rebuilt.dig('_meta', 'hostvars', 'foreman.example.com')
|
38
|
-
assert_equal 'sshpass', host_vars['
|
38
|
+
assert_equal 'sshpass', host_vars['ansible_password']
|
39
39
|
assert_equal 'mypass', host_vars['ansible_become_password']
|
40
40
|
end
|
41
41
|
|
42
42
|
test 'host secrets are used when not overriden by inventory secrest' do
|
43
43
|
rebuilt = runner.send(:rebuild_secrets, inventory, input)
|
44
44
|
host_vars = rebuilt.dig('_meta', 'hostvars', 'foreman.example.com')
|
45
|
-
assert_equal 'letmein', host_vars['
|
45
|
+
assert_equal 'letmein', host_vars['ansible_password']
|
46
46
|
assert_equal 'iamroot', host_vars['ansible_become_password']
|
47
47
|
end
|
48
48
|
end
|
@@ -87,7 +87,7 @@ class PlaybookRunnerTest < ActiveSupport::TestCase
|
|
87
87
|
'_meta' => { 'hostvars' => { 'foreman.example.com' => {} } } }
|
88
88
|
end
|
89
89
|
let(:secrets) do
|
90
|
-
host_secrets = { '
|
90
|
+
host_secrets = { 'ansible_password' => 'letmein', 'ansible_become_password' => 'iamroot' }
|
91
91
|
{ 'per-host' => { 'foreman.example.com' => host_secrets } }
|
92
92
|
end
|
93
93
|
let(:runner) { ForemanAnsibleCore::Runner::Playbook.allocate }
|
@@ -96,14 +96,14 @@ class PlaybookRunnerTest < ActiveSupport::TestCase
|
|
96
96
|
test_inventory = inventory.merge('ssh_password' => 'sshpass', 'effective_user_password' => 'mypass')
|
97
97
|
rebuilt = runner.send(:rebuild_secrets, test_inventory, secrets)
|
98
98
|
host_vars = rebuilt.dig('_meta', 'hostvars', 'foreman.example.com')
|
99
|
-
assert_equal 'sshpass', host_vars['
|
99
|
+
assert_equal 'sshpass', host_vars['ansible_password']
|
100
100
|
assert_equal 'mypass', host_vars['ansible_become_password']
|
101
101
|
end
|
102
102
|
|
103
103
|
test 'host secrets are used when not overriden by inventory secrest' do
|
104
104
|
rebuilt = runner.send(:rebuild_secrets, inventory, secrets)
|
105
105
|
host_vars = rebuilt.dig('_meta', 'hostvars', 'foreman.example.com')
|
106
|
-
assert_equal 'letmein', host_vars['
|
106
|
+
assert_equal 'letmein', host_vars['ansible_password']
|
107
107
|
assert_equal 'iamroot', host_vars['ansible_become_password']
|
108
108
|
end
|
109
109
|
end
|
@@ -69,7 +69,7 @@ module ForemanAnsible
|
|
69
69
|
connection_params['ansible_winrm_server_cert_validation']
|
70
70
|
assert_equal Setting['remote_execution_effective_user_method'],
|
71
71
|
connection_params['ansible_become_method']
|
72
|
-
refute connection_params.key?('
|
72
|
+
refute connection_params.key?('ansible_password')
|
73
73
|
refute connection_params.key?('ansible_become_password')
|
74
74
|
end
|
75
75
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_ansible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Lobato Garcia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: foreman_ansible_core
|