corrected bug of grains not filled when using defaults parameters
authorPaul Tonelli <paul.tonelli@logilab.fr>
Mon, 18 Mar 2013 11:47:15 +0100
changeset 85 8010f73133e5
parent 84 40a8790380af
child 86 ce88c3698ff5
corrected bug of grains not filled when using defaults parameters
ami_pre/init.sls
update.sls
--- a/ami_pre/init.sls	Fri Mar 15 10:28:04 2013 +0100
+++ b/ami_pre/init.sls	Mon Mar 18 11:47:15 2013 +0100
@@ -2,8 +2,8 @@
 
 {% if 'ami.type' not in grains %}
 ami.type:
-    grains.present:
-        - value : debian
+    present:
+        - value: {{ salt['state.single']('grains.present', 'ami.type', value='debian') }}
 {% endif %}
 
 variation_extracted:
--- a/update.sls	Fri Mar 15 10:28:04 2013 +0100
+++ b/update.sls	Mon Mar 18 11:47:15 2013 +0100
@@ -10,8 +10,8 @@
 
 {% if 'ami.hg_address' not in grains %}
 ami.hg_address:
-    grains.present:
-        - value : http://hg.logilab.fr/users/ptonelli/srv_salt
+    present:
+        - value: {{ salt['state.single']('grains.present', 'ami.hg_address', value='http://hg.logilab.fr/users/ptonelli/srv_salt') }}
 {% endif %}
 
 hg_code: