Created
December 6, 2012 17:54
-
-
Save centrix/4226523 to your computer and use it in GitHub Desktop.
jinja2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gtw01.localhost: | |
Data failed to compile: | |
---------- | |
Rendering SLS iptables failed, render error: | |
expected token 'end of print statement', got 'grains' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment