]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
tests: Update ansible ssh_args variable
authorDimitri Savineau <dsavinea@redhat.com>
Fri, 14 Jun 2019 21:31:39 +0000 (17:31 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 11 Jul 2019 09:39:03 +0000 (11:39 +0200)
Because we're using vagrant, a ssh config file will be created for
each nodes with options like user, host, port, identity, etc...
But via tox we're override ANSIBLE_SSH_ARGS to use this file. This
remove the default value set in ansible.cfg.

Also adding PreferredAuthentications=publickey because CentOS/RHEL
servers are configured with GSSAPIAuthenticationis enabled for ssh
server forcing the client to make a PTR DNS query.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 34f9d51178f4cd37a7df1bb74897dff7eb5c065f)

ansible.cfg
tox-update.ini
tox.ini

index 1973586588a30bc1cf9dad9e75bbcd9526ff048e..1466b77c121420a39af0afceaf79bd5e6d24ddec 100644 (file)
@@ -30,8 +30,8 @@ timeout = 30
 [ssh_connection]
 # see: https://github.com/ansible/ansible/issues/11536
 control_path = %(directory)s/%%h-%%r-%%p
-ssh_args = -o ControlMaster=auto -o ControlPersist=600s
-pipelining = True 
+ssh_args = -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
+pipelining = True
 
 # Option to retry failed ssh executions if the failure is encountered in ssh itself
 retries = 5
index 28fac79d0d4fcf0bce3e3951e3bfb67d2d148297..105d7244b963e47ebe516117a4ea5a346c5f0cac 100644 (file)
@@ -12,7 +12,7 @@ whitelist_externals =
     pip
 passenv=*
 setenv=
-  ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config
+  ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
   ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
   ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions
   ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback
diff --git a/tox.ini b/tox.ini
index f0ed0a0a991f42710a9d87d2492f85431f7843ba..fe60387959355bcba0821a7f2af8dd425ec65b8f 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -16,7 +16,7 @@ whitelist_externals =
     cat
 passenv=*
 setenv=
-  ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config
+  ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
   ANSIBLE_CONFIG = -F {toxinidir}/ansible.cfg
   ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions
   ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback
@@ -142,7 +142,7 @@ whitelist_externals =
 passenv=*
 sitepackages=True
 setenv=
-  ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config
+  ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
   ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
   ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions
   ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback