2022-10-10 23:15:28 +02:00
|
|
|
# start services db
|
|
|
|
|
|
|
|
- name: Stopping existing service
|
|
|
|
community.docker.docker_compose:
|
|
|
|
project_src: "{{ project_src }}"
|
|
|
|
state: absent
|
|
|
|
|
|
|
|
- name: Starting service
|
|
|
|
community.docker.docker_compose:
|
|
|
|
project_src: "{{ project_src }}"
|
|
|
|
register: output
|
|
|
|
|
|
|
|
- name: debug output
|
|
|
|
debug:
|
|
|
|
var: output
|
|
|
|
|
2022-10-11 22:50:34 +02:00
|
|
|
- name: "Allow port {{ item }}"
|
2022-10-10 23:15:28 +02:00
|
|
|
ansible.builtin.iptables:
|
|
|
|
chain: INPUT
|
|
|
|
protocol: tcp
|
2022-10-11 22:50:34 +02:00
|
|
|
destination_port: "{{ item }}"
|
2022-10-10 23:15:28 +02:00
|
|
|
jump: ACCEPT
|
|
|
|
state: present
|
|
|
|
vars:
|
|
|
|
ansible_become: yes
|
|
|
|
ansible_become_method: sudo
|
|
|
|
ansible_become_password: "{{ sudo_password }}"
|
2022-10-11 22:50:34 +02:00
|
|
|
with_items: "{{ ports_tcp }}"
|
|
|
|
|