From 949507d304e2f49abefc3ff9e170e383e655a6b4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Thu, 19 Apr 2018 18:54:53 +0200 Subject: [PATCH] mon: remove mgr key from ceph_config_keys MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This key is created after the last mon is up so there is no need to try to push it from the first mon. The initia mon container is not creating the mgr key, ansible does. So this key will never exist. The key will go into the fetch dir once the last mon is up, then when the ceph-mgr plays it will try to get it from the fetch directory. Signed-off-by: Sébastien Han --- roles/ceph-mon/tasks/docker/copy_configs.yml | 20 -------------------- roles/ceph-mon/tasks/docker/main.yml | 1 + 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/roles/ceph-mon/tasks/docker/copy_configs.yml b/roles/ceph-mon/tasks/docker/copy_configs.yml index 652066588..d751f3d28 100644 --- a/roles/ceph-mon/tasks/docker/copy_configs.yml +++ b/roles/ceph-mon/tasks/docker/copy_configs.yml @@ -19,26 +19,6 @@ ceph_config_keys: "{{ ceph_config_keys + bootstrap_rbd_keyring }}" when: ceph_release_num[ceph_release] >= ceph_release_num.luminous -- name: set_fact tmp_ceph_mgr_keys add mgr keys to config and keys paths - set_fact: - tmp_ceph_mgr_keys: /etc/ceph/{{ cluster }}.mgr.{{ hostvars[item]['ansible_hostname'] }}.keyring - with_items: "{{ groups.get(mgr_group_name, []) }}" - register: tmp_ceph_mgr_keys_result - when: - - groups.get(mgr_group_name, []) | length > 0 - -- name: set_fact ceph_mgr_keys convert mgr keys to an array - set_fact: - ceph_mgr_keys: "{{ tmp_ceph_mgr_keys_result.results | map(attribute='ansible_facts.tmp_ceph_mgr_keys') | list }}" - when: - - groups.get(mgr_group_name, []) | length > 0 - -- name: set_fact ceph_config_keys merge mgr keys to config and keys paths - set_fact: - ceph_config_keys: "{{ ceph_config_keys + ceph_mgr_keys }}" - when: - - groups.get(mgr_group_name, []) | length > 0 - - name: stat for ceph config and keys local_action: module: stat diff --git a/roles/ceph-mon/tasks/docker/main.yml b/roles/ceph-mon/tasks/docker/main.yml index 0c0bb15f7..8654cce08 100644 --- a/roles/ceph-mon/tasks/docker/main.yml +++ b/roles/ceph-mon/tasks/docker/main.yml @@ -78,6 +78,7 @@ - name: include fetch_configs.yml include: fetch_configs.yml + run_once: true when: not containerized_deployment_with_kv - name: create ceph rest api keyring when mon is containerized -- 2.39.5