diff --git a/playbooks/production/setup_firewall.yml b/playbooks/production/setup_firewall.yml index 9b400bdf..2cb59cd4 100755 --- a/playbooks/production/setup_firewall.yml +++ b/playbooks/production/setup_firewall.yml @@ -6,6 +6,7 @@ # For CentOS - name: Enable SELinux selinux: policy=targeted state=permissive + when: ansible_distribution == 'CentOS' - name: Install firewalld yum: name=firewalld state=present @@ -29,7 +30,10 @@ # For Ubuntu / Debian - name: Install ufw - apt: name=ufw state=present + apt: name={{ item }} state=present force=yes + with_items: + - python-selinux + - ufw when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian' - name: Enable Firewall