]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Load a variable file for devices parrition
authorWingKai Ho <sanguosifang@163.com>
Wed, 1 Mar 2017 09:27:57 +0000 (17:27 +0800)
committerGitHub <noreply@github.com>
Wed, 1 Mar 2017 09:27:57 +0000 (17:27 +0800)
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

infrastructure-playbooks/make-osd-partitions.yml

index 6f49124fd91845288e014d468c3005110d7841bc..192c3ccbf2b615b63a0d935b1c16b4c703c1b1c5 100644 (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
   - "{{ 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