mirror of https://github.com/ceph/ceph-ansible.git
Update make-osd-partitions.yml
When ansible do not load the file host_vars/{{ ansible_hostname }}.yml and host_vars/default.yml it will show syntactic err, so add keyword "skip" to fix it. Exit the playbook if the user not define devices in both host_vars/{{ ansible_hostname }}.yml and host_vars/default.yml host_vars/default.ymlpull/1336/head
parent
4cc489f2ba
commit
2861a483d7
|
@ -34,8 +34,15 @@
|
||||||
- name: load a variable file for devices partition
|
- name: load a variable file for devices partition
|
||||||
include_vars: "{{ item }}"
|
include_vars: "{{ item }}"
|
||||||
with_first_found:
|
with_first_found:
|
||||||
|
- files:
|
||||||
- "host_vars/{{ ansible_hostname }}.yml"
|
- "host_vars/{{ ansible_hostname }}.yml"
|
||||||
- "host_vars/default.yml"
|
- "host_vars/default.yml"
|
||||||
|
skip: true
|
||||||
|
|
||||||
|
- name: exit playbook, if devices not defined
|
||||||
|
fail:
|
||||||
|
msg: "devices must be define in host_vars/default.yml or host_vars/{{ ansible_hostname }}.yml"
|
||||||
|
when: devices is not defined
|
||||||
|
|
||||||
- name: install sgdisk(gdisk)
|
- name: install sgdisk(gdisk)
|
||||||
package:
|
package:
|
||||||
|
|
Loading…
Reference in New Issue