39 lines
848 B
YAML
39 lines
848 B
YAML
# start services db
|
|
|
|
- name: Stopping existing service
|
|
community.docker.docker_compose:
|
|
project_src: /home/valentin/db
|
|
state: absent
|
|
|
|
- name: Starting service
|
|
community.docker.docker_compose:
|
|
project_src: /home/valentin/db
|
|
register: output
|
|
|
|
- name: debug output
|
|
debug:
|
|
var: output
|
|
|
|
- name: Allow port postgresql
|
|
ansible.builtin.iptables:
|
|
chain: INPUT
|
|
protocol: tcp
|
|
destination_port: 54321
|
|
jump: ACCEPT
|
|
state: present
|
|
vars:
|
|
ansible_become: yes
|
|
ansible_become_method: sudo
|
|
ansible_become_password: "{{ sudo_password }}"
|
|
|
|
- name: Allow port redis
|
|
ansible.builtin.iptables:
|
|
chain: INPUT
|
|
protocol: tcp
|
|
destination_port: 63791
|
|
jump: ACCEPT
|
|
state: present
|
|
vars:
|
|
ansible_become: yes
|
|
ansible_become_method: sudo
|
|
ansible_become_password: "{{ sudo_password }}" |