Merge pull request #40 from simonpasquier/fix-storage-test
Misc fixes for LVM storage
diff --git a/linux/storage/init.sls b/linux/storage/init.sls
index 01b41b6..102d71a 100644
--- a/linux/storage/init.sls
+++ b/linux/storage/init.sls
@@ -1,5 +1,5 @@
{%- from "linux/map.jinja" import storage with context %}
-{%- if storage.mount|length > 0 or storage.swap|length > 0 or storage.multipath.enabled %}
+{%- if storage.mount|length > 0 or storage.swap|length > 0 or storage.multipath.enabled or storage.lvm|length > 0 %}
include:
{%- if storage.mount|length > 0 %}
- linux.storage.mount
diff --git a/linux/storage/lvm.sls b/linux/storage/lvm.sls
index 59941b1..13f0e84 100644
--- a/linux/storage/lvm.sls
+++ b/linux/storage/lvm.sls
@@ -25,7 +25,7 @@
- name: {{ vg.get('name', vgname) }}
- devices: {{ vg.devices|join(',') }}
-{%- for lvname, volume in vg.volume.iteritems() %}
+{%- for lvname, volume in vg.get('volume', {}).iteritems() %}
lvm_{{ vg.get('name', vgname) }}_lv_{{ volume.get('name', lvname) }}:
lvm.lv_present: