]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
adopt: fix ceph_origin and ceph_repository defaults
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 29 Nov 2021 09:48:23 +0000 (10:48 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 29 Nov 2021 12:40:00 +0000 (13:40 +0100)
This is overriding those variables because the precedence at the 'block
var' level is greater than the group_vars/host_vars.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2026861
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/cephadm-adopt.yml

index 51617d2cf31bb96bdd7ca914f3913090a6e4020a..7b4adc5d821359de7c3472b39ac0aed79716930a 100644 (file)
 
     - name: configure repository for installing cephadm
       when: containerized_deployment | bool
-      vars:
-        ceph_origin: repository
-        ceph_repository: community
       block:
+        - name: set_fact ceph_origin
+          set_fact:
+            ceph_origin: repository
+          when: ceph_origin == 'dummy'
+
+        - name: set_fact ceph_repository
+          set_fact:
+            ceph_repository: community
+          when: ceph_repository == 'dummy'
+
         - name: validate repository variables
           import_role:
             name: ceph-validate