re-organizing playbook deploy-db

This commit is contained in:
2022-10-08 18:15:53 +02:00
parent fd1d6b6261
commit a844e10970
22 changed files with 116 additions and 215 deletions

34
db/tasks/stop-db.yml Normal file
View File

@@ -0,0 +1,34 @@
# stop services db and redis
- name: Disallow port postgresql
ansible.builtin.iptables:
chain: INPUT
protocol: tcp
destination_port: 54321
jump: ACCEPT
state: absent
become: yes
become_method: sudo
- name: Disallow port redis
ansible.builtin.iptables:
chain: INPUT
protocol: tcp
destination_port: 63791
jump: ACCEPT
state: absent
become: yes
become_method: sudo
- name: Stopping existing service
community.docker.docker_compose:
project_src: /home/valentin/db
state: present
stopped: yes
register: output
- name: Debug output
debug:
var: output