Skip to content

Commit

Permalink
linter: address syntax errors
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
guits committed Mar 8, 2024
1 parent 16d1b01 commit 7340b94
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion infrastructure-playbooks/cephadm-adopt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@
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
Expand Down
4 changes: 2 additions & 2 deletions infrastructure-playbooks/shrink-mds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -165,4 +165,4 @@
post_tasks:
- name: show ceph health
command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} -s"
changed_when: false
changed_when: false
4 changes: 2 additions & 2 deletions infrastructure-playbooks/shrink-mgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -130,4 +130,4 @@
post_tasks:
- name: show ceph health
command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} -s"
changed_when: false
changed_when: false
4 changes: 2 additions & 2 deletions infrastructure-playbooks/shrink-mon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -144,4 +144,4 @@
- name: show ceph mon status
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} mon stat"
delegate_to: "{{ mon_host }}"
changed_when: false
changed_when: false
6 changes: 3 additions & 3 deletions infrastructure-playbooks/shrink-osd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
- name: gather facts and check the init system

hosts:
- "{{ mon_group_name|default('mons') }}"
- "{{ osd_group_name|default('osds') }}"
- mons
- osds

become: True
tasks:
- debug: msg="gather facts on all Ceph hosts for following reference"

- name: confirm whether user really meant to remove osd(s) from the cluster

hosts: "{{ groups[mon_group_name][0] }}"
hosts: mons[0]

become: true

Expand Down
2 changes: 1 addition & 1 deletion infrastructure-playbooks/shrink-rbdmirror.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7340b94

Please sign in to comment.