diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2018-03-20 15:47:51 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2018-03-20 15:47:51 +0100 |
commit | e2c7b1305ca8495065dcf40fd2092d7c698dd6ea (patch) | |
tree | abcaa7006a9c4b7a9add9bd0bf8c24f7f8ce048f /roles/ands_network/tasks/firewall_service.yml | |
parent | 47f350bc3aa85a8bd406d95faf084df2abf74ae9 (diff) | |
download | ands-e2c7b1305ca8495065dcf40fd2092d7c698dd6ea.tar.gz ands-e2c7b1305ca8495065dcf40fd2092d7c698dd6ea.tar.bz2 ands-e2c7b1305ca8495065dcf40fd2092d7c698dd6ea.tar.xz ands-e2c7b1305ca8495065dcf40fd2092d7c698dd6ea.zip |
Local volumes and StatefulSet to provision Master/Slave MySQL and Galera cluster
Diffstat (limited to 'roles/ands_network/tasks/firewall_service.yml')
-rw-r--r-- | roles/ands_network/tasks/firewall_service.yml | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/roles/ands_network/tasks/firewall_service.yml b/roles/ands_network/tasks/firewall_service.yml new file mode 100644 index 0000000..98bc866 --- /dev/null +++ b/roles/ands_network/tasks/firewall_service.yml @@ -0,0 +1,13 @@ +- name: "Copy firewalld service '{{ service }}'" + copy: src="{{ 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) |