Skip to content

Instantly share code, notes, and snippets.

@centrix
Created December 6, 2012 17:57
Show Gist options
  • Save centrix/4226549 to your computer and use it in GitHub Desktop.
Save centrix/4226549 to your computer and use it in GitHub Desktop.
gtw01.localhost:
Data failed to compile:
----------
Rendering SLS iptables failed, render error:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/salt/utils/templates.py", line 49, in render_tmpl
output = render_str(tmplstr, context)
File "/usr/lib/python2.7/site-packages/salt/utils/templates.py", line 80, in render_jinja_tmpl
return env.from_string(tmplstr).render(**context)
File "/usr/lib/python2.7/site-packages/jinja2/environment.py", line 894, in render
return self.environment.handle_exception(exc_info, True)
File "<template>", line 7, in top-level template code
iptables:
pkg:
- installed
file:
- managed
- name: /etc/iptables/centrix.iptables
{% if grains['classtype'] == 'gtw' %}
- source: salt://iptables/gtw.iptables
{% elif grains['classtype'] == 'sbc' %}
- source: salt://iptables/sbc.iptables
{% elif grains['classtype'] == 'ops' %}
- source: salt://iptables/ops.iptables
{% else %}
- source: salt://iptables/base.iptables
{% endif %}
- user: root
- group: root
- mode: 644
- makedirs: True
cmd:
- run
- name: /usr/sbin/iptables-restore < /etc/iptables/centrix.iptables
- watch:
- file: iptables
- pkg: iptables
service:
- running
- enabled
- watch:
- cmd: iptables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment