load device partition file in directory host_vars
1) if the user define host_vars/hostname.yml load the devices partition on this file.
2) otherwise load host_vars/default.yml for default
---
-# This playbook will make custom partition layout for your osd hosts.
+# This playbook will make custom layout for your osd hosts.
# You should define `devices` variable for every host.
#
# For example, in host_vars/hostname1
- "{{ osd_group_name }}"
tasks:
+
+ - name: Load a variable file for devices partition
+ include_vars: "{{ item }}"
+ with_first_found:
+ - "host_vars/{{ ansible_hostname }}.yml"
+ - "host_vars/default.yml"
+
- name: install sgdisk(gdisk)
package:
name: gdisk