2018-08-12 20:26:21 +02:00
|
|
|
# == State: firewalld.backends
|
|
|
|
#
|
|
|
|
# This state ensures that /etc/firewalld/backends/ exists.
|
|
|
|
#
|
|
|
|
{% from "firewalld/map.jinja" import firewalld with context %}
|
|
|
|
|
2018-08-26 00:00:11 +02:00
|
|
|
{% set backend_manage = firewalld.backend.manage %}
|
|
|
|
{% set backend_pkg = firewalld.backend.pkg %}
|
|
|
|
|
|
|
|
# Backward compatibility setting and deprecation notices
|
|
|
|
### Manage setting (old firewalld:installbackend)
|
|
|
|
{% if firewalld.installbackend is defined %}
|
|
|
|
firewalld-installbackend-deprecated:
|
|
|
|
test.show_notification:
|
|
|
|
- text: |
|
|
|
|
'firewalld:installbackend' is deprecated. Set 'firewalld:backend:manage' instead.
|
|
|
|
See firewalld/pillar.example for more information
|
|
|
|
|
|
|
|
{% set backend_manage = firewalld.installbackend %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
### Package setting (old firewalld:backendpackage)
|
|
|
|
{% if firewalld.backendpackage is defined %}
|
|
|
|
firewalld-backendpackage-deprecated:
|
|
|
|
test.show_notification:
|
|
|
|
- text: |
|
|
|
|
'firewalld:backendpackage' is deprecated. Use 'firewalld:backend:pkg' instead
|
|
|
|
See firewalld/pillar.example for more information
|
|
|
|
|
|
|
|
{% set backend_pkg = firewalld.backendpackage %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{%- if backend_manage %}
|
2018-08-12 20:26:21 +02:00
|
|
|
package_backend:
|
|
|
|
pkg.installed:
|
2018-08-26 00:00:11 +02:00
|
|
|
- name: {{ backend_pkg }}
|
2018-08-12 20:26:21 +02:00
|
|
|
{%- endif %}
|