foreman_ansible_core 2.2.0 → 2.2.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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec7cac54f7db525000849608439276fd87cb5c18
|
4
|
+
data.tar.gz: fb7033e1fbfc751b6ba4b0a54f0c7da9047302e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19ad3f4950508999a31d3b8cb969bf6e60246763ef15a2a401b31c2adddfe0aae8900e2f9ef303a17fbf4e1b387c2a38187d34ffbdac89c03bddba669c5c4269
|
7
|
+
data.tar.gz: 3f5a68bc74b91eb32fdc146a4191daf9d40d35fbca1cbc582ecd56dc9cf4d898254cfa888e6872383cc007d409f6c13cfdab1527dc684156a899b5119b2d6da5
|
@@ -5,6 +5,7 @@ module ForemanAnsibleCore
|
|
5
5
|
# Takes an inventory and runs it through REXCore CommandRunner
|
6
6
|
class AnsibleRunner < ::ForemanTasksCore::Runner::CommandRunner
|
7
7
|
DEFAULT_REFRESH_INTERVAL = 1
|
8
|
+
CONNECTION_PROMPT = 'Are you sure you want to continue connecting (yes/no)? '
|
8
9
|
|
9
10
|
def initialize(options)
|
10
11
|
super(options)
|
@@ -39,6 +40,21 @@ module ForemanAnsibleCore
|
|
39
40
|
@command_in = @playbook_runner.command_in
|
40
41
|
@command_pid = @playbook_runner.command_pid
|
41
42
|
super
|
43
|
+
kill if unknown_host_key_fingerprint?
|
44
|
+
end
|
45
|
+
|
46
|
+
def kill
|
47
|
+
publish_exit_status(1)
|
48
|
+
::Process.kill('SIGTERM', @command_pid)
|
49
|
+
close
|
50
|
+
end
|
51
|
+
|
52
|
+
private
|
53
|
+
|
54
|
+
def unknown_host_key_fingerprint?
|
55
|
+
last_output = @continuous_output.raw_outputs.last
|
56
|
+
return if last_output.nil?
|
57
|
+
last_output['output']&.lines&.last == CONNECTION_PROMPT
|
42
58
|
end
|
43
59
|
end
|
44
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_ansible_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.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:
|
11
|
+
date: 2019-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubocop
|