add tasks to open firewall ports

This commit is contained in:
Andreas Zweili 2021-11-11 15:20:27 +01:00
parent 178b8cce74
commit 792ac62aca
1 changed files with 16 additions and 0 deletions

View File

@ -54,6 +54,22 @@
become: no
when: docker_skip_project is undefined
- name: "Open the required UDP ports"
ansible.builtin.ufw:
rule: "allow"
port: "{{ item }}"
proto: "udp"
loop: "{{ docker_udp_ports }}"
when: docker_udp_ports is defined
- name: "Open the required TCP ports"
ansible.builtin.ufw:
rule: "allow"
port: "{{ item }}"
proto: "udp"
loop: "{{ docker_tcp_ports }}"
when: docker_tcp_ports is defined
- name: "Start the Docker containers"
community.docker.docker_compose:
project_src: "{{ docker_project_path }}"