corrected bugs:
authorPaul Tonelli <paul.tonelli@logilab.fr>
Fri, 08 Mar 2013 10:08:28 +0100
changeset 40 4ffc0e0ccbda
parent 39 03dddd352693
child 41 a72cbdd66053
corrected bugs: - error in chroot path for top.sls and variations.sls - corrected requirement of resize before mounting and added copy managed state for missing files in chroot : - variation.minion to chroot/etc/salt
ami_creator.sls
ami_creator_post.sls
ami_creator_pre.sls
--- a/ami_creator.sls	Fri Mar 08 10:06:49 2013 +0100
+++ b/ami_creator.sls	Fri Mar 08 10:08:28 2013 +0100
@@ -6,6 +6,7 @@
       - python
       - mercurial
       - tar
+      - rsync
       - glance
 
 hg_ami_creation:
--- a/ami_creator_post.sls	Fri Mar 08 10:06:49 2013 +0100
+++ b/ami_creator_post.sls	Fri Mar 08 10:08:28 2013 +0100
@@ -26,7 +26,7 @@
 {% for file in salt['file.find']('/mnt/variation/boot/', iname='initrd*') %}
 initrd:
     tmp_func.local_managed:
-        - name: /mnt/vmlinuz_variation
+        - name: /mnt/initrd_variation
         - source: {{ file }}
 {% endfor %}
 
--- a/ami_creator_pre.sls	Fri Mar 08 10:06:49 2013 +0100
+++ b/ami_creator_pre.sls	Fri Mar 08 10:08:28 2013 +0100
@@ -35,7 +35,7 @@
             - loop
         - require:
             - file.directory: /mnt/variation
-            - archive.extracted: variation_extracted
+            - tmp_func.resized: resize_variation
 
 chroot_proc:
     mount.mounted:
@@ -88,10 +88,17 @@
         - require:
             - mount.mounted: mounted_variation
 
+minion:
+    file.managed:
+        - name: /mnt/variation/etc/salt/minion
+        - source: salt://variation.minion
+        - mode: 644
+        - require:
+            - mount.mounted: mounted_variation
 
 variation.sls:
     file.managed:
-        - name: /mnt/variation/etc/salt/variation.sls
+        - name: /mnt/variation/etc/salt/srv/variation.sls
         - source: salt://variation.sls
         - mode: 644
         - require:
@@ -99,7 +106,7 @@
 
 variation.top.sls:
     file.managed:
-        - name: /mnt/variation/etc/salt/top.sls
+        - name: /mnt/variation/etc/salt/srv/top.sls
         - source: salt://variation.top.sls
         - mode: 644
         - require: