re-organizing playbook deploy-db
This commit is contained in:
34
db/tasks/start-db.yml
Normal file
34
db/tasks/start-db.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
# start services db
|
||||
|
||||
- name: Stopping existing service
|
||||
community.docker.docker_compose:
|
||||
project_src: /home/valentin/db
|
||||
|
||||
- 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
|
||||
become: yes
|
||||
become_method: sudo
|
||||
|
||||
- name: Allow port redis
|
||||
ansible.builtin.iptables:
|
||||
chain: INPUT
|
||||
protocol: tcp
|
||||
destination_port: 63791
|
||||
jump: ACCEPT
|
||||
state: present
|
||||
become: yes
|
||||
become_method: sudo
|
Reference in New Issue
Block a user