From ea81a4593157e299fc3dc1132d3dc5108dccd562 Mon Sep 17 00:00:00 2001 From: Sebastien Perreault Date: Fri, 1 Feb 2019 07:48:41 -0500 Subject: [PATCH] added the ability to trigger or not firewalld #1 --- defaults/main.yml | 2 ++ tasks/main.yml | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 1d95f02..9db786c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -5,3 +5,5 @@ cockpit_packages: - cockpit - cockpit-bridge - cockpit-machines +cockpit_use_firewalld: false +cockpit_listen_port: 9090 diff --git a/tasks/main.yml b/tasks/main.yml index 3dda1a2..0374704 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -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