[ami_pre] add option to have custom image size (closes #237450)

authorPaul Tonelli <paul.tonelli@logilab.fr>
changeset190e2b6898af
branchdefault
phasepublic
hiddenno
parent revision#fc7aed6c7194 [doc] improve sample user-data file to provide more details
child revision#35610e3611e3 update default size to 6G
files modified by this revision
ami_pre/init.sls
# HG changeset patch
# User Paul Tonelli <paul.tonelli@logilab.fr>
# Date 1370964614 -7200
# Tue Jun 11 17:30:14 2013 +0200
# Node ID 190e2b6898afdd0f81ac6ecbe66a8dbbba2ee109
# Parent fc7aed6c71948fa621ef3266a66dd6dc12072c57
[ami_pre] add option to have custom image size (closes #237450)

diff --git a/ami_pre/init.sls b/ami_pre/init.sls
@@ -19,11 +19,15 @@
1 
2  ### Resize the partition ###
3  resize_variation:
4      tmp_state.resized:
5          - name: /mnt/output/variation.img
6 +{% if 'ami.image_size' in grains %}
7 +        - size: {{ grains['ami.image_size'] }}
8 +{% else %}
9          - size: 3G
10 +{% endif %}
11  {% if not salt['file.file_exists']('/mnt/output/variation.img') %}
12          - require:
13              - archive.extracted: variation_extracted
14  {% endif %}
15