wrong call to file.find instead of grains.item in ami creator templates
authorPaul Tonelli <paul.tonelli@logilab.fr>
Mon, 11 Mar 2013 18:29:08 +0100
changeset 65 0cba5e282f10
parent 64 38b62296b765
child 66 23a31e4cbb65
wrong call to file.find instead of grains.item in ami creator templates
ami_creator.sls
ami_creator_pre.sls
--- a/ami_creator.sls	Mon Mar 11 18:23:55 2013 +0100
+++ b/ami_creator.sls	Mon Mar 11 18:29:08 2013 +0100
@@ -10,16 +10,16 @@
       - glance
 
 
-{% if  salt['file.find']('ami_hg_address') %}
-{% set ami_hg_address = salt['file.find']('ami_hg_address') %}
+{% if  salt['grains.item']('ami_hg_address') %}
+{% set ami_hg_address = salt['grains.item']('ami_hg_address') %}
 {% else %}
 {% set ami_hg_address = 'http://hg.logilab.fr/users/ptonelli/srv_salt' %}
 {% endif %}
 hg_ami_creation:
     hg.latest:
         - name: {{ ami_hg_address }}
-{% if  salt['file.find']('ami_hg_revision') %}
-{% set ami_hg_revision = salt['file.find']('ami_hg_revision') %}
+{% if  salt['grains.item']('ami_hg_revision') %}
+{% set ami_hg_revision = salt['grains.item']('ami_hg_revision') %}
         - rev: {{ ami_hg_revision }}
 {% endif %}
         - target: /etc/salt/srv
--- a/ami_creator_pre.sls	Mon Mar 11 18:23:55 2013 +0100
+++ b/ami_creator_pre.sls	Mon Mar 11 18:29:08 2013 +0100
@@ -1,7 +1,7 @@
 ### unarchived files ###
 
-{% if  salt['file.find']('ami_origin') %}
-{% set ami_origin = salt['file.find']('ami_origin') %}
+{% if  salt['grains.item']('ami_origin') %}
+{% set ami_origin = salt['grains.item']('ami_origin') %}
 {% else %}
 {% set ami_origin = 'debian' %}
 {% endif %}