Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test_jinja_stuff:
- file:
- - managed
- - name: /tmp/test_jinja.txt
- - contents: |
- {%- set isLocal = "false" -%}
- {% for ip in salt['grains.get']('ipv4') if ip.startswith('10.255.255') -%}
- {%- set isLocal = "true" -%}
- {% endfor %}
- {% if isLocal == "true" %}
- - env.development
- {% else %}
- - env.production
- {%- endif %}
- ends in
- [root@web_server tmp]# salt-call state.sls test
- [INFO ] Loading fresh modules for state activity
- local:
- Data failed to compile:
- ----------
- Too many functions declared in state "file" in sls test
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement