Load a variable file for devices parrition

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
pull/1336/head
WingKai Ho 2017-03-01 17:27:57 +08:00 committed by GitHub
parent 421d1a2853
commit 2967772f6a
1 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,5 @@
---
# 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
@ -30,6 +30,13 @@
- "{{ 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