mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-01-24 04:49:26 +00:00
lala
This commit is contained in:
parent
6361d8528a
commit
93459ee448
@ -4,9 +4,34 @@
|
|||||||
vars:
|
vars:
|
||||||
arch_name: docker_mailu2_data
|
arch_name: docker_mailu2_data
|
||||||
tasks:
|
tasks:
|
||||||
- name: Start mailu rasp
|
|
||||||
|
- name: Get ruleset
|
||||||
|
command: nvram get vts_rulelist
|
||||||
|
when: inventory_hostname in groups['router']
|
||||||
|
register: ruleset
|
||||||
|
|
||||||
|
- name: Pause for 60 seconds
|
||||||
|
ansible.builtin.pause:
|
||||||
|
seconds: 60
|
||||||
|
|
||||||
|
- name: Set new ruleset
|
||||||
|
command: nvram set vts_rulelist="{{ ruleset.stdout | replace('192.168.77.246', '192.168.77.106') }}"
|
||||||
|
when: inventory_hostname in groups['router']
|
||||||
|
|
||||||
|
- name: Nvram commit
|
||||||
|
command: nvram commit
|
||||||
|
when: inventory_hostname in groups['router']
|
||||||
|
|
||||||
|
- name: Restart firewall
|
||||||
|
command: service restart_firewall
|
||||||
|
when: inventory_hostname in groups['router']
|
||||||
|
args:
|
||||||
|
warn: false
|
||||||
|
|
||||||
|
|
||||||
|
- name: Stop mailu rasp
|
||||||
uri:
|
uri:
|
||||||
url: "http://192.168.77.106:9000/api/stacks/{{ item }}/start?endpointId=13"
|
url: "http://192.168.77.106:9000/api/stacks/{{ item }}/stop?endpointId=2"
|
||||||
method: POST
|
method: POST
|
||||||
body_format: form-urlencoded
|
body_format: form-urlencoded
|
||||||
return_content: yes
|
return_content: yes
|
||||||
@ -22,29 +47,4 @@
|
|||||||
#- 140
|
#- 140
|
||||||
- 180
|
- 180
|
||||||
|
|
||||||
- name: Get ruleset
|
|
||||||
command: nvram get vts_rulelist
|
|
||||||
when: inventory_hostname in groups['router']
|
|
||||||
register: ruleset
|
|
||||||
|
|
||||||
- name: Pause for 60 seconds
|
|
||||||
ansible.builtin.pause:
|
|
||||||
seconds: 60
|
|
||||||
|
|
||||||
- name: Set new ruleset
|
|
||||||
command: nvram set vts_rulelist="{{ ruleset.stdout | replace('192.168.77.106', '192.168.77.246') }}"
|
|
||||||
when: inventory_hostname in groups['router']
|
|
||||||
|
|
||||||
- name: Nvram commit
|
|
||||||
command: nvram commit
|
|
||||||
when: inventory_hostname in groups['router']
|
|
||||||
|
|
||||||
- name: Restart firewall
|
|
||||||
command: service restart_firewall
|
|
||||||
when: inventory_hostname in groups['router']
|
|
||||||
args:
|
|
||||||
warn: false
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user