updates to pre and post states to add/remove the necessary files
authorPaul Tonelli <paul.tonelli@logilab.fr>
Tue, 05 Mar 2013 14:39:30 +0100
changeset 18 4239da26bf7c
parent 17 05455a83e87e
child 19 4229d57223fe
updates to pre and post states to add/remove the necessary files
ami_creator_post.sls
ami_creator_pre.sls
--- a/ami_creator_post.sls	Tue Mar 05 15:41:49 2013 +0100
+++ b/ami_creator_post.sls	Tue Mar 05 14:39:30 2013 +0100
@@ -1,5 +1,15 @@
 ### Salt state to check after modifying chroot ###
 
+### deletes ###
+
+policy_removed:
+    file.absent:
+        - name: /mnt/variation/usr/sbin/policy-rc.d
+
+resolvconf_removed:
+    file.absent:
+        - name: /mnt/variation/etc/resolv.conf
+
 ### umounts ###
 umount_chroot_proc:
     tmp_func.umounted:
@@ -11,8 +21,10 @@
 
 umount_chroot_slash:
     tmp_func.umounted:
-        - name:/mnt/variation
-    require:
-        - umount_chroot_devpts
-        - umount_chroot_proc
+        - name: /mnt/variation
+        - require:
+            - tmp_func.umounted: umount_chroot_devpts
+            - tmp_func.umounted: umount_chroot_proc
+            - file.absent: policy_removed
+            - file.absent: resolvconf_removed
 
--- a/ami_creator_pre.sls	Tue Mar 05 15:41:49 2013 +0100
+++ b/ami_creator_pre.sls	Tue Mar 05 14:39:30 2013 +0100
@@ -15,6 +15,7 @@
         - name: http://hg.logilab.fr/users/ptonelli/srv_salt
         - target: /etc/salt/srv
 
+
 ### Mounts ###
 mounted_variation:
     mount.mounted: