Skip to content

Instantly share code, notes, and snippets.

@justlooks
Created February 25, 2014 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justlooks/9204426 to your computer and use it in GitHub Desktop.
Save justlooks/9204426 to your computer and use it in GitHub Desktop.
my jinja template file
#!/bin/bash
# upload script for project {% for project in projects %}{{project}} {% endfor %}
get all cate from all prj
echo `date` >> mylog
SRCPERFIX="/data/6/scribe"
DUMPPREFIX="/data/6/scribe/dump"
HDFSPREFIX="/user/hive/warehouse"
CATE=({% for project in projects %}{% for i in pillar[project]['store_category'] %}{{i}} {% endfor %}{% endfor %})
for((k=0;k<${#CATE[@]};k++));do # this is the code which trigger the error ,if remove the code everything is ok
done
here is the error when i run the command
# salt -E 'ch1[5]' state.sls scribe
ch15:
----------
State: - file
Name: /tmp/local_to_hdfs.sh
Function: managed
Result: False
Comment: Missing end of comment tag; line 15 in template
Changes:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment