Saltstack Official FirewallD 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.

38 lines
1.2KB

  1. # == State: firewalld.backends
  2. #
  3. # This state ensures that /etc/firewalld/backends/ exists.
  4. #
  5. {% from "firewalld/map.jinja" import firewalld with context %}
  6. {% set backend_manage = firewalld.backend.manage %}
  7. {% set backend_pkg = firewalld.backend.pkg %}
  8. # Backward compatibility setting and deprecation notices
  9. ### Manage setting (old firewalld:installbackend)
  10. {% if firewalld.installbackend is defined %}
  11. firewalld-installbackend-deprecated:
  12. test.show_notification:
  13. - text: |
  14. 'firewalld:installbackend' is deprecated. Set 'firewalld:backend:manage' instead.
  15. See firewalld/pillar.example for more information
  16. {% set backend_manage = firewalld.installbackend %}
  17. {% endif %}
  18. ### Package setting (old firewalld:backendpackage)
  19. {% if firewalld.backendpackage is defined %}
  20. firewalld-backendpackage-deprecated:
  21. test.show_notification:
  22. - text: |
  23. 'firewalld:backendpackage' is deprecated. Use 'firewalld:backend:pkg' instead
  24. See firewalld/pillar.example for more information
  25. {% set backend_pkg = firewalld.backendpackage %}
  26. {% endif %}
  27. {%- if backend_manage %}
  28. package_backend:
  29. pkg.installed:
  30. - name: {{ backend_pkg }}
  31. {%- endif %}