]> 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)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 17 Jun 2019 14:45:38 +0000 (16:45 +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
roles/ceph-config/tasks/create_ceph_initial_dirs.yml
tox-dashboard.ini
tox-podman.ini
tox-update.ini
tox.ini

index 82678520c8df4ce23d821f0721b6924cd919f287..1773833a4f7d65281bb01f02fac8082ce1de40f6 100644 (file)
@@ -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
index b7c9a084801bfb5f46e7d015b1cfee14d366f640..a7f1325c85e4b9040e91e3bfbb97846c45072764 100644 (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
   file:
     path: "{{ item }}"
@@ -25,4 +6,19 @@
     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
index d29059481332560e30a84ad9152e2b7c65311f60..764720edde8bf697548bdb8d4f12c092903ec11b 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
index dd5d978e055e5f906c48c8508f5f057d803e0713..cac13333076b48e53c57a3c55ec26266da1b7209 100644 (file)
@@ -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
index 41f5d639d672a14ef19faff81832fd7b0d3503fd..34e89e5ba200d162ccc2059beae5cdc251bdd33d 100644 (file)
@@ -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
diff --git a/tox.ini b/tox.ini
index fe527c1bc26aa92bb39323dcb935055d0697362b..21432ca67717a95b01999e517cbcff36bb0b5cf9 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -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
@@ -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
@@ -317,7 +317,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