From 7e074231bdda1bea1a33485414192556f6f40eea Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 23 Feb 2021 17:53:56 +0000 Subject: [PATCH] Remove firewall Yes, really! Docker no like! --- tasks/security.yml | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/tasks/security.yml b/tasks/security.yml index b2f7115..eda04f5 100644 --- a/tasks/security.yml +++ b/tasks/security.yml @@ -24,46 +24,3 @@ dest: "{{ home }}/.ssh/assh.yml" mode: 0644 owner: "{{ user }}" - -- name: Install Firewall - aur: - name: "{{ item }}" - become: true - become_user: aur_builder - loop: - - firewalld - -- name: Enable firewalld - systemd: - name: firewalld - enabled: true - state: started - -- name: Define firewall ports - set_fact: - requested_firewall_ports: - - 22/tcp # SSH - - 80/tcp # Web (crab) - -- name: Get firewall ports - shell: firewall-cmd --list-ports - become: true - register: firewall_ports - changed_when: false - -- name: Open firewall ports - ansible.posix.firewalld: - port: "{{ item }}" - permanent: true - immediate: true - state: enabled - loop: "{{ requested_firewall_ports }}" - -- name: Close firewall ports - ansible.posix.firewalld: - port: "{{ item }}" - permanent: true - immediate: true - state: disabled - when: item and item not in requested_firewall_ports - loop: "{{ firewall_ports.stdout.split(' ') }}"