[ami_pre] add option to have custom image size (closes #237450)
authorPaul Tonelli <paul.tonelli@logilab.fr>
Tue, 11 Jun 2013 17:30:14 +0200
changeset 177 190e2b6898af
parent 176 fc7aed6c7194
child 178 35610e3611e3
[ami_pre] add option to have custom image size (closes #237450)
ami_pre/init.sls
--- a/ami_pre/init.sls	Tue Jul 16 10:43:03 2013 +0200
+++ b/ami_pre/init.sls	Tue Jun 11 17:30:14 2013 +0200
@@ -21,7 +21,11 @@
 resize_variation:
     tmp_state.resized:
         - name: /mnt/output/variation.img
+{% if 'ami.image_size' in grains %}
+        - size: {{ grains['ami.image_size'] }}
+{% else %}
         - size: 3G
+{% endif %}
 {% if not salt['file.file_exists']('/mnt/output/variation.img') %}
         - require:
             - archive.extracted: variation_extracted