Skip to content

Commit

Permalink
tests: Update ansible ssh_args variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dsavineau authored and guits committed Jun 17, 2019
1 parent 1019e3b commit 34f9d51
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 27 deletions.
2 changes: 1 addition & 1 deletion ansible.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ timeout = 60
[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
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
Expand Down
36 changes: 16 additions & 20 deletions roles/ceph-config/tasks/create_ceph_initial_dirs.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
---
- 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
file:
path: "{{ item }}"
state: directory
owner: "{{ ceph_uid }}"
group: "{{ ceph_uid }}"
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
2 changes: 1 addition & 1 deletion tox-dashboard.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tox-podman.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,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
Expand Down
2 changes: 1 addition & 1 deletion tox-update.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,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
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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 = -F {toxinidir}/ansible.cfg
ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions
ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback
Expand Down Expand Up @@ -86,7 +86,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
Expand Down Expand Up @@ -330,7 +330,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
Expand Down

0 comments on commit 34f9d51

Please sign in to comment.