renamed state resize to resized, add the resiez operations in sls pre and post
authorPaul Tonelli <paul.tonelli@logilab.fr>
Thu, 07 Mar 2013 11:30:42 +0100
changeset 38 c44ee1ef62fb
parent 37 1a5705cac904
child 39 03dddd352693
renamed state resize to resized, add the resiez operations in sls pre and post
_states/tmp_func.py
ami_creator_post.sls
ami_creator_pre.sls
--- a/_states/tmp_func.py	Thu Mar 07 10:42:38 2013 +0100
+++ b/_states/tmp_func.py	Thu Mar 07 11:30:42 2013 +0100
@@ -76,7 +76,7 @@
                 ret['comment'] = output
     return ret
 
-def resize(name, size=0):
+def resized(name, size=0):
     '''
     Resize partition and filesystem on a file with an ext* fs whenever
     possible (size in Mb) and check the integrity (for ext* fs)
--- a/ami_creator_post.sls	Thu Mar 07 10:42:38 2013 +0100
+++ b/ami_creator_post.sls	Thu Mar 07 11:30:42 2013 +0100
@@ -52,3 +52,11 @@
             - file.absent: resolvconf_removed
             - file.absent: 01proxy_removed
 
+### Resize the partition to min ###
+resize_variation:
+    tmp_func.resized:
+        - name: /mnt/variation_debian.img
+        - require:
+            - archive.extracted: variation_extracted
+
+
--- a/ami_creator_pre.sls	Thu Mar 07 10:42:38 2013 +0100
+++ b/ami_creator_pre.sls	Thu Mar 07 11:30:42 2013 +0100
@@ -7,6 +7,15 @@
         - tar_options: z
         - if_missing: variation_debian.img
 
+### Resize the partition ###
+resize_variation:
+    tmp_func.resized:
+        - name: /mnt/variation_debian.img
+        - size: 3G
+        - require:
+            - archive.extracted: variation_extracted
+
+
 ###  Directories ###
 /mnt/variation:
     file.directory: