mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2025-01-23 20:39:26 +00:00
upt playbook
This commit is contained in:
parent
f587494d16
commit
a6eb29fdf4
@ -30,13 +30,13 @@
|
||||
when: inventory_hostname in groups['nas']
|
||||
|
||||
|
||||
- name: Test
|
||||
- name: Get ruleset
|
||||
command: nvram get vts_rulelist
|
||||
when: inventory_hostname in groups['router']
|
||||
register: result
|
||||
register: ruleset
|
||||
|
||||
- name: Test
|
||||
command: nvram set vts_rulelist="{{ result.stdout | replace('192.168.77.106', '192.168.77.246') }}"
|
||||
- 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: Test
|
||||
@ -76,7 +76,6 @@
|
||||
Content-Type: "application/json"
|
||||
X-API-Key: "ptr_DfS2M6Fj2P3fVvYpkhE0KJh2UGCzY47ePaFaLqadsjg="
|
||||
timeout: 60
|
||||
register: result
|
||||
ignore_errors: yes
|
||||
when: inventory_hostname in groups['nas']
|
||||
|
||||
@ -90,12 +89,16 @@
|
||||
Content-Type: "application/json"
|
||||
X-API-Key: "ptr_DfS2M6Fj2P3fVvYpkhE0KJh2UGCzY47ePaFaLqadsjg="
|
||||
timeout: 60
|
||||
register: result
|
||||
|
||||
ignore_errors: yes
|
||||
when: inventory_hostname in groups['nas']
|
||||
|
||||
- name: Test
|
||||
command: nvram set vts_rulelist="{{ result.stdout }}"
|
||||
|
||||
- debug:
|
||||
msg: "{{ ruleset.stdout }}"
|
||||
|
||||
- name: Set new ruleset
|
||||
command: nvram set vts_rulelist="{{ ruleset.stdout }}"
|
||||
when: inventory_hostname in groups['router']
|
||||
|
||||
- name: Test
|
||||
|
Loading…
x
Reference in New Issue
Block a user