]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
linter: address syntax errors
authorGuillaume Abrioux <gabrioux@ibm.com>
Fri, 8 Mar 2024 16:10:43 +0000 (17:10 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Mon, 11 Mar 2024 14:48:19 +0000 (15:48 +0100)
This fixes the following error:
```
syntax-check[specific]: The field 'hosts' has an invalid value, which
includes an undefined variable.
```

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
infrastructure-playbooks/cephadm-adopt.yml
infrastructure-playbooks/shrink-mds.yml
infrastructure-playbooks/shrink-mgr.yml
infrastructure-playbooks/shrink-mon.yml
infrastructure-playbooks/shrink-osd.yml
infrastructure-playbooks/shrink-rbdmirror.yml

index 818777b142dff5a4c60f209eeb1fad388a3e4b41..9a0767598e6f0455718ba0e455840ca487863682 100644 (file)
         CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
 
 - name: adopt ceph mgr daemons
-  hosts: "{{ groups[mgr_group_name] | default(groups[mon_group_name]) }}"
+  hosts: "{{ groups['mgrs'] | default(groups['mons']) | default(omit) }}"
   serial: 1
   become: true
   gather_facts: false
index 296ef52f1f90beddd8a4e69b54fa48eb22f76245..04b8e1daa8db2aed788bb69efd4fdfcbb9c04a96 100644 (file)
@@ -24,7 +24,7 @@
         tasks_from: container_binary
 
 - name: perform checks, remove mds and print cluster health
-  hosts: "{{ groups[mon_group_name][0] }}"
+  hosts: mons[0]
   become: true
   vars_prompt:
     - name: ireallymeanit
   post_tasks:
     - name: show ceph health
       command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} -s"
-      changed_when: false
\ No newline at end of file
+      changed_when: false
index 66745f7c607a461395a08de1a7b09471f81e8086..378ab661a43bd10ec74c953925cb4732a90fd028 100644 (file)
@@ -21,7 +21,7 @@
         msg: gather facts on all Ceph hosts for following reference
 
 - name: confirm if user really meant to remove manager from the ceph cluster
-  hosts: "{{ groups[mon_group_name][0] }}"
+  hosts: mons[0]
   become: true
   vars_prompt:
     - name: ireallymeanit
   post_tasks:
     - name: show ceph health
       command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} -s"
-      changed_when: false
\ No newline at end of file
+      changed_when: false
index 05d6c2be543e1483cf028d85ec5a0e2ee864f623..1bf1f7c46a15cd7a00ffb84128779d1313be8dc9 100644 (file)
@@ -22,7 +22,7 @@
     - debug: msg="gather facts on all Ceph hosts for following reference"
 
 - name: confirm whether user really meant to remove monitor from the ceph cluster
-  hosts: "{{ groups[mon_group_name][0] }}"
+  hosts: mons[0]
   become: true
   vars_prompt:
     - name: ireallymeanit
     - name: show ceph mon status
       command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} mon stat"
       delegate_to: "{{ mon_host }}"
-      changed_when: false
\ No newline at end of file
+      changed_when: false
index 8e739fafa22c85ade78e50c6802b2d1833470e64..6f866710d93db92cfb38940dff254a5f9a3583d4 100644 (file)
@@ -14,8 +14,8 @@
 - name: gather facts and check the init system
 
   hosts:
-    - "{{ mon_group_name|default('mons') }}"
-    - "{{ osd_group_name|default('osds') }}"
+    - mons
+    - osds
 
   become: True
   tasks:
@@ -23,7 +23,7 @@
 
 - name: confirm whether user really meant to remove osd(s) from the cluster
 
-  hosts: "{{ groups[mon_group_name][0] }}"
+  hosts: mons[0]
 
   become: true
 
index db7cc3a213c810c32ec875fa038a5507b558039a..92a30679ae29813cc9367e2a80b8c43d130402f0 100644 (file)
@@ -22,7 +22,7 @@
 
 - name: confirm whether user really meant to remove rbd mirror from the ceph
         cluster
-  hosts: "{{ groups[mon_group_name][0] }}"
+  hosts: mons[0]
   become: true
   vars_prompt:
     - name: ireallymeanit