Skip to content

Commit

Permalink
Fixes #25481 - Set ProxyCommand=none for Ansible
Browse files Browse the repository at this point in the history
In case of IPA there's a ProxyCommand set that handles known hosts, but
foreman_ansible has its own way of handling known hosts. This sets the
ssh args to force override this.
  • Loading branch information
ekohl committed Jun 6, 2019
1 parent 52da188 commit 3785bbf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions manifests/plugin/ansible.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,16 @@
#
# $stdout_callback:: Ansible's stdout_callback setting
#
# $ssh_args:: The ssh_args parameter in ansible.cfg under [ssh_connection]
#
class foreman_proxy::plugin::ansible (
Boolean $enabled = $::foreman_proxy::plugin::ansible::params::enabled,
Foreman_proxy::ListenOn $listen_on = $::foreman_proxy::plugin::ansible::params::listen_on,
Stdlib::Absolutepath $ansible_dir = $::foreman_proxy::plugin::ansible::params::ansible_dir,
Optional[Stdlib::Absolutepath] $working_dir = $::foreman_proxy::plugin::ansible::params::working_dir,
Boolean $host_key_checking = $::foreman_proxy::plugin::ansible::params::host_key_checking,
String $stdout_callback = $::foreman_proxy::plugin::ansible::params::stdout_callback,
String $ssh_args = $::foreman_proxy::plugin::ansible::params::ssh_args,
) inherits foreman_proxy::plugin::ansible::params {
$foreman_url = $::foreman_proxy::foreman_base_url
$foreman_ssl_cert = pick($::foreman_proxy::foreman_ssl_cert, $::foreman_proxy::ssl_cert)
Expand Down
1 change: 1 addition & 0 deletions manifests/plugin/ansible/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
$working_dir = '/tmp'
$host_key_checking = false
$stdout_callback = 'yaml'
$ssh_args = '-o ProxyCommand=none'
}
3 changes: 3 additions & 0 deletions templates/plugin/ansible.cfg.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ url = <%= @foreman_url %>
ssl_cert = <%= @foreman_ssl_cert %>
ssl_key = <%= @foreman_ssl_key %>
verify_certs = <%= @foreman_ssl_ca %>

[ssh_connection]
ssh_args = <%= @ssh_args %>

0 comments on commit 3785bbf

Please sign in to comment.