deploy: Only configure firewall if it's already running

This commit is contained in:
James Graham
2020-03-30 20:30:37 +01:00
parent 74d3c1b091
commit 1bc45b1106

View File

@@ -223,6 +223,9 @@
- uwsgi - uwsgi
- rh-nginx114-nginx - rh-nginx114-nginx
- name: Populate service facts
service_facts:
- name: Open webserver ports on firewall - name: Open webserver ports on firewall
firewalld: firewalld:
service: '{{ item }}' service: '{{ item }}'
@@ -232,4 +235,4 @@
loop: loop:
- http - http
- https - https
when: vagrant_dir.stat.exists == False when: ansible_facts.services['firewalld.service'] is defined and ansible_facts.services['firewalld.service'].state == 'running'