Update firewall config for docker usage

This commit is contained in:
Ethan Paul 2020-03-22 21:21:39 -04:00
parent 9970e17d2f
commit 088123b3ce
No known key found for this signature in database
GPG Key ID: C5F5542B54A4D9C6

View File

@ -1,16 +1,23 @@
--- ---
- import_playbook: meta.yml
- name: Configure docker hosts - name: Configure docker hosts
hosts: servers hosts: servers
roles: roles:
- role: docker - role: docker
tasks: tasks:
- name: Disable firewall on internal interface - name: Allow swarm traffic through the firewall
become: true become: true
firewalld: firewalld:
state: enabled state: enabled
service: docker-swarm service: docker-swarm
zone: public
permanent: true
immediate: true
- name: Disable firewall on docker bridge interface
become: true
firewalld:
state: enabled
interface: docker0
zone: trusted
permanent: true permanent: true
immediate: true immediate: true