added the ability to trigger or not firewalld #1

This commit is contained in:
Sebastien Perreault 2019-02-01 07:48:41 -05:00 committed by Barry van Someren
parent f83fd0cc95
commit ea81a45931
2 changed files with 4 additions and 1 deletions

View File

@ -5,3 +5,5 @@ cockpit_packages:
- cockpit
- cockpit-bridge
- cockpit-machines
cockpit_use_firewalld: false
cockpit_listen_port: 9090

View File

@ -14,10 +14,11 @@
- name: enable firewall
firewalld:
service: cockpit
port: "{{ cockpit_listen_port }}/tcp"
permanent: true
immediate: true
state: enabled
when: cockpit_use_firewalld
- name: reload systemd if unit file changed
command: systemctl daemon-reload