firewall rules for postgresql and redis
This commit is contained in:
parent
73b5b7b867
commit
10f4f4863a
@ -46,4 +46,24 @@
|
|||||||
|
|
||||||
- name: debug output
|
- name: debug output
|
||||||
debug:
|
debug:
|
||||||
var: output
|
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
|
@ -1,6 +1,27 @@
|
|||||||
---
|
---
|
||||||
# tasks file for server
|
# tasks file for server
|
||||||
|
|
||||||
|
- 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
|
- name: Stopping existing service
|
||||||
community.docker.docker_compose:
|
community.docker.docker_compose:
|
||||||
project_src: /home/valentin/db
|
project_src: /home/valentin/db
|
||||||
@ -11,3 +32,4 @@
|
|||||||
- name: Debug output
|
- name: Debug output
|
||||||
debug:
|
debug:
|
||||||
var: output
|
var: output
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user