Saltstack Official IPTables Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
713B

  1. {%- from "iptables/map.jinja" import schema with context %}
  2. {%- set include_allowed = true %}
  3. {%- if grains.get('virtual_subtype', None) in ['Docker', 'LXC'] %}
  4. {%- set include_allowed = false %}
  5. echo_usupported_environment:
  6. cmd.run:
  7. - name: echo "You are trying to use iptables inside of docker or lxc. Kernel modules loading are not supported here"
  8. {%- endif %}
  9. {%- if pillar.iptables.service.enabled is defined %}
  10. {%- set include_allowed = false %}
  11. echo_usupported_pillars_schema:
  12. cmd.run:
  13. - name: echo "You are trying to use old style pillars schema. Please update pillars according to the current schema"
  14. {%- endif %}
  15. {%- if include_allowed %}
  16. include:
  17. - iptables.v{{ schema.epoch }}
  18. {%- endif %}