moved ami.type default grains creation in update.sls instead of ami_pre/init.sls
authorPaul Tonelli <paul.tonelli@logilab.fr>
Thu, 21 Mar 2013 17:06:41 +0100
changeset 91 b7d005a8ef48
parent 90 e3d6302bcff4
child 92 46707aed3c76
moved ami.type default grains creation in update.sls instead of ami_pre/init.sls
ami_pre/init.sls
update.sls
--- a/ami_pre/init.sls	Thu Mar 21 16:55:54 2013 +0100
+++ b/ami_pre/init.sls	Thu Mar 21 17:06:41 2013 +0100
@@ -1,11 +1,5 @@
 ### unarchived files ###
 
-{% if 'ami.type' not in grains %}
-ami.type:
-    present:
-        - value: {{ salt['state.single']('grains.present', 'ami.type', value='debian') }}
-{% endif %}
-
 variation_extracted:
     archive.extracted:
         - name: /mnt/
--- a/update.sls	Thu Mar 21 16:55:54 2013 +0100
+++ b/update.sls	Thu Mar 21 17:06:41 2013 +0100
@@ -8,6 +8,12 @@
       - rsync
       - glance
 
+{% if 'ami.type' not in grains %}
+ami.type:
+    grains.present:
+        - value: debian
+{% endif %}
+
 {% if 'ami.hg_address_server' not in grains %}
 ami.hg_address_server:
     grains.present: