From 6eb4cd2813af060e3061b5dd4301affd820f12cb Mon Sep 17 00:00:00 2001 From: Francesco Pantano Date: Wed, 18 Nov 2020 12:10:20 +0100 Subject: [PATCH] Refresh ceph-ansible group_vars values The purpose of this change is having a mechanism to refresh the ceph-ansible group_vars/ when a Ceph related service, that defines a specific set of variables, is included in the overcloud. For this reason, this patch: 1. Adds the "prepare" tasks (including tripleo-ceph-work-dir) at the beginning of Step2. By doing this we can make sure that all the variables needed by ceph-ansible are properly collected at Step1, and persisted (in group_vars/*) at Step2, before the ceph-ansible playbook execution. This approach is valid for all the services that define additional ConfigOverrides variables 2. Removes the "prepare" (including tripleo-ceph-work-dir) in the rgw service: having the "prepare" tasks included "per role" creates the risk of executing it multiple times. For example, including "prepare" in clients and rgw results in three execution of the same thing! Adding it at the beginning of Step 2 ensures that it's executed at least two times. Change-Id: If81477ad2c6048b7103810e519083a0870897fa3 (cherry picked from commit 1fafca733c995dc835cbe040c12d766e8ac02cd4) --- deployment/ceph-ansible/ceph-base.yaml | 4 ++++ deployment/ceph-ansible/ceph-rgw.yaml | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deployment/ceph-ansible/ceph-base.yaml b/deployment/ceph-ansible/ceph-base.yaml index 7f7df294db..db1b77e5e5 100644 --- a/deployment/ceph-ansible/ceph-base.yaml +++ b/deployment/ceph-ansible/ceph-base.yaml @@ -719,6 +719,10 @@ outputs: data: {get_param: CephAnsibleEnvironmentVariables} expression: $.data.items().select($.join('=')) ceph_ansible_skip_tags: {get_param: CephAnsibleSkipTags} + - name: Refresh ceph-ansible group_vars variables + include_role: + name: tripleo_ceph_work_dir + tasks_from: prepare - name: get ssh private key include_role: name: tripleo-ceph-work-dir diff --git a/deployment/ceph-ansible/ceph-rgw.yaml b/deployment/ceph-ansible/ceph-rgw.yaml index b49748fb8f..49b081a3fa 100644 --- a/deployment/ceph-ansible/ceph-rgw.yaml +++ b/deployment/ceph-ansible/ceph-rgw.yaml @@ -147,10 +147,6 @@ outputs: - radosgw_frontend_ssl_certificate: '/etc/pki/tls/certs/ceph_rgw.pem' - {get_attr: [CephRgwAnsibleVars, value, vars]} ceph_rgw_config_overrides: {get_attr: [CephRgwConfigOverrides, value, vars]} - - name: create ceph-ansible working directory - include_role: - name: tripleo-ceph-work-dir - tasks_from: prepare - name: generate ceph-ansible group vars rgws copy: dest: "{{playbook_dir}}/ceph-ansible/group_vars/rgws.yml"