tests: Update ansible ssh_args variable

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 34f9d51178)
pull/4114/head
Dimitri Savineau 2019-06-14 17:31:39 -04:00 committed by Guillaume Abrioux
parent 82ab98326c
commit b1f8518ef9
6 changed files with 23 additions and 27 deletions

View File

@ -31,7 +31,7 @@ timeout = 60
[ssh_connection] [ssh_connection]
# see: https://github.com/ansible/ansible/issues/11536 # see: https://github.com/ansible/ansible/issues/11536
control_path = %(directory)s/%%h-%%r-%%p control_path = %(directory)s/%%h-%%r-%%p
ssh_args = -o ControlMaster=auto -o ControlPersist=600s ssh_args = -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
pipelining = True pipelining = True
# Option to retry failed ssh executions if the failure is encountered in ssh itself # Option to retry failed ssh executions if the failure is encountered in ssh itself

View File

@ -1,23 +1,4 @@
--- ---
- name: set_fact ceph_directories
set_fact:
ceph_directories:
- /etc/ceph
- /var/lib/ceph/
- /var/lib/ceph/mon
- /var/lib/ceph/osd
- /var/lib/ceph/mds
- /var/lib/ceph/tmp
- /var/lib/ceph/radosgw
- /var/lib/ceph/bootstrap-rgw
- /var/lib/ceph/bootstrap-mgr
- /var/lib/ceph/bootstrap-mds
- /var/lib/ceph/bootstrap-osd
- /var/lib/ceph/bootstrap-rbd
- /var/lib/ceph/bootstrap-rbd-mirror
- /var/run/ceph
- /var/log/ceph
- name: create ceph initial directories - name: create ceph initial directories
file: file:
path: "{{ item }}" path: "{{ item }}"
@ -25,4 +6,19 @@
owner: "{{ ceph_uid }}" owner: "{{ ceph_uid }}"
group: "{{ ceph_uid }}" group: "{{ ceph_uid }}"
mode: 0755 mode: 0755
with_items: "{{ ceph_directories }}" loop:
- /etc/ceph
- /var/lib/ceph/
- /var/lib/ceph/mon
- /var/lib/ceph/osd
- /var/lib/ceph/mds
- /var/lib/ceph/tmp
- /var/lib/ceph/radosgw
- /var/lib/ceph/bootstrap-rgw
- /var/lib/ceph/bootstrap-mgr
- /var/lib/ceph/bootstrap-mds
- /var/lib/ceph/bootstrap-osd
- /var/lib/ceph/bootstrap-rbd
- /var/lib/ceph/bootstrap-rbd-mirror
- /var/run/ceph
- /var/log/ceph

View File

@ -12,7 +12,7 @@ whitelist_externals =
pip pip
passenv=* passenv=*
setenv= 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_CONFIG = {toxinidir}/ansible.cfg
ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions
ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback

View File

@ -13,7 +13,7 @@ whitelist_externals =
passenv=* passenv=*
sitepackages=True sitepackages=True
setenv= 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_CONFIG = {toxinidir}/ansible.cfg
ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions
ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback

View File

@ -11,7 +11,7 @@ whitelist_externals =
pip pip
passenv=* passenv=*
setenv= 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_CONFIG = {toxinidir}/ansible.cfg
ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions
ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback

View File

@ -17,7 +17,7 @@ whitelist_externals =
pip pip
passenv=* passenv=*
setenv= 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_CONFIG = -F {toxinidir}/ansible.cfg
ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions
ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback
@ -86,7 +86,7 @@ whitelist_externals =
cat cat
passenv=* passenv=*
setenv= 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_CONFIG = -F {toxinidir}/ansible.cfg
ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions
ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback
@ -317,7 +317,7 @@ whitelist_externals =
passenv=* passenv=*
sitepackages=True sitepackages=True
setenv= 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_CONFIG = {toxinidir}/ansible.cfg
ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions
ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback