blob: d3c6e9b5bed4b6d4373520091783c04dbac737c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
- name: "Copy firewalld service '{{ service }}'"
copy: src="firewalld/{{ service }}.xml" dest="{{ firewall_template_path }}/{{ service }}.xml" owner=root group=root mode="0644"
register: result
- name: "Delete old version of firewalld service '{{ service }}'"
command: "firewall-offline-cmd --remove-service={{ service }}"
when:
- service in servicelist
- result | changed
- name: "Create firewalld service '{{ service }}'"
command: "firewall-offline-cmd --new-service-from-file='{{ firewall_template_path }}/{{ service }}.xml' --name={{ service }}"
when: (service not in servicelist) or (result | changed)
|