]> git.apps.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)
committerDimitri Savineau <savineau.dimitri@gmail.com>
Mon, 17 Jun 2019 16:02:36 +0000 (12:02 -0400)
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
roles/ceph-config/tasks/create_ceph_initial_dirs.yml
tox-update.ini
tox.ini

index 1aedef80c95b57cd6b6d73c6f1e473a41824ccb8..c31fa5cfae46aab783f4a0db8912e1807e74a34c 100644 (file)
@@ -30,7 +30,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
index a20f9a4537b445f3854d59df4840099e25df52f2..3e72196202c596b4bdd596412dcfabbb275e89b5 100644 (file)
@@ -1,20 +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-mds
-      - /var/lib/ceph/bootstrap-osd
-      - /var/lib/ceph/bootstrap-rbd
-      - /var/run/ceph
-
 - name: create ceph initial directories
   file:
     path: "{{ item }}"
@@ -22,4 +6,16 @@
     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-mds
+    - /var/lib/ceph/bootstrap-osd
+    - /var/lib/ceph/bootstrap-rbd
+    - /var/run/ceph
index b7b6d34dd48bb2debc32c1eb1d6fb272f11ded0b..89828c5963079bb369a08d7351e6954b1ded27d4 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 1befd6f01e5e405e00eff730b4bc256c448bf022..7ce362fc392bda01afee6cb6368e2441642adbed 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 = {toxinidir}/ansible.cfg
   ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions
   ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback
@@ -176,7 +176,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