]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
common: improve keyrings generation
authorGuillaume Abrioux <gabrioux@redhat.com>
Wed, 2 Oct 2019 07:57:50 +0000 (09:57 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 2 Oct 2019 11:09:50 +0000 (13:09 +0200)
There is no need to get n * number of nodes the different keyrings.
Adding a `run_once: true` here avoid running a ceph command too many
times which could be impacting large cluster deployment.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-client/tasks/pre_requisite.yml
roles/ceph-iscsi-gw/tasks/common.yml
roles/ceph-mds/tasks/common.yml
roles/ceph-mgr/tasks/common.yml
roles/ceph-nfs/tasks/pre_requisite_container.yml
roles/ceph-nfs/tasks/pre_requisite_non_container.yml
roles/ceph-osd/tasks/common.yml
roles/ceph-osd/tasks/openstack_config.yml
roles/ceph-rbd-mirror/tasks/common.yml
roles/ceph-rgw/tasks/common.yml

index a05a91d377399998ecf2433816ebbf33c6287a65..69735237735047975c6b19a62b556d1a688ec8e0 100644 (file)
@@ -7,6 +7,7 @@
       with_items:
         - { name: "client.admin", path: "/etc/ceph/{{ cluster }}.client.admin.keyring", copy_key: "{{ copy_admin_key }}" }
       delegate_to: "{{ groups.get(mon_group_name)[0] }}"
+      run_once: true
       when:
         - cephx | bool
         - item.copy_key | bool
index d792ed90230e8630d1e665edd2d3d00cd441b8b3..c7e8d8cdf8dd24dadc2bd36a3828633247e99da4 100644 (file)
@@ -5,6 +5,7 @@
   with_items:
     - { name: "client.admin", path: "/etc/ceph/{{ cluster }}.client.admin.keyring", copy_key: "{{ copy_admin_key }}" }
   delegate_to: "{{ groups.get(mon_group_name)[0] }}"
+  run_once: true
   when:
     - cephx | bool
     - item.copy_key | bool
index af30d59b91b3cce7885ecd4a66fc1d271092647b..c81988b04e2ec480d5f72f4c77db69eee2a3f848 100644 (file)
@@ -17,6 +17,7 @@
     - { name: "client.bootstrap-mds", path: "/var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring", copy_key: true }
     - { name: "client.admin", path: "/etc/ceph/{{ cluster }}.client.admin.keyring", copy_key: "{{ copy_admin_key }}" }
   delegate_to: "{{ groups.get(mon_group_name)[0] }}"
+  run_once: true
   when:
     - cephx | bool
     - item.copy_key | bool
index 717a332974ded1b0a8eca112cef1fbccff671003..352a76c442f9f8fabe883aa07ce68e596936e6ea 100644 (file)
@@ -59,6 +59,7 @@
       register: _mgr_keys
       with_items: "{{ _mgr_keys }}"
       delegate_to: "{{ groups.get(mon_group_name)[0] }}"
+      run_once: true
       when:
         - cephx | bool
         - item.copy_key | bool
index 15d3f421c4f990a3308fdda3cb91635010f9b2ca..1cda5ef25de18969d4427bc689e6b4953f507e6d 100644 (file)
@@ -8,6 +8,7 @@
         - { name: "client.bootstrap-rgw", path: "/var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring", copy_key: true }
         - { name: "client.admin", path: "/etc/ceph/{{ cluster }}.client.admin.keyring", copy_key: "{{ copy_admin_key }}" }
       delegate_to: "{{ groups.get(mon_group_name)[0] }}"
+      run_once: true
       when:
         - cephx | bool
         - item.copy_key | bool
index ba39a6e1d46eb2be9eff951934f4c7b7d56a5a06..a5bc4d07eaf323db45e6c7a38e71c94775fbfa2f 100644 (file)
@@ -53,6 +53,7 @@
         - { name: "client.bootstrap-rgw", path: "/var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring", copy_key: true }
         - { name: "client.admin", path: "/etc/ceph/{{ cluster }}.client.admin.keyring", copy_key: "{{ copy_admin_key }}" }
       delegate_to: "{{ groups.get(mon_group_name)[0] }}"
+      run_once: true
       when:
         - cephx | bool
         - item.copy_key | bool
index c5d86736d4112c0f03f9e9f757d4f98b92257d0f..ca5a210b34f2333bdf448ca11b5a5d347c28c1b2 100644 (file)
@@ -18,6 +18,7 @@
     - { name: "client.bootstrap-osd", path: "/var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring", copy_key: true }
     - { name: "client.admin", path: "/etc/ceph/{{ cluster }}.client.admin.keyring", copy_key: "{{ copy_admin_key }}" }
   delegate_to: "{{ groups.get(mon_group_name)[0] }}"
+  run_once: true
   when:
     - cephx | bool
     - item.copy_key | bool
index e94ae30228ddd3c597639a4a9b68e394614683c6..796c3c533fbb065a1599fe65a49667bdd2d1c6cd 100644 (file)
@@ -86,6 +86,7 @@
       command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} auth get {{ item.name }}"
       register: _osp_keys
       with_items: "{{ openstack_keys }}"
+      run_once: true
       delegate_to: "{{ groups.get(mon_group_name)[0] }}"
 
     - name: copy ceph key(s) if needed
index f2ba0e7ff2a686c320230e45d7f772b90d077684..e350808aef6d2dc695e1f053a5a9883d53bd49bb 100644 (file)
@@ -6,6 +6,7 @@
     - { name: "client.bootstrap-rbd-mirror", path: "/var/lib/ceph/bootstrap-rbd-mirror/{{ cluster }}.keyring", copy_key: true }
     - { name: "client.admin", path: "/etc/ceph/{{ cluster }}.client.admin.keyring", copy_key: "{{ copy_admin_key }}" }
   delegate_to: "{{ groups.get(mon_group_name)[0] }}"
+  run_once: true
   when:
     - cephx | bool
     - item.copy_key | bool
index 105b89189902022541894dd384bea4c190ecd271..a33e0ab96d5aa055e49857e00b3c663fc28ba846 100644 (file)
@@ -25,6 +25,7 @@
     - { name: "client.bootstrap-rgw", path: "/var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring", copy_key: true }
     - { name: "client.admin", path: "/etc/ceph/{{ cluster }}.client.admin.keyring", copy_key: "{{ copy_admin_key }}" }
   delegate_to: "{{ groups.get(mon_group_name)[0] }}"
+  run_once: true
   when:
     - cephx | bool
     - item.copy_key | bool