mirror of
https://gitlab.sectorq.eu/jaydee/ansible.git
synced 2026-03-13 13:42:47 +01:00
build
This commit is contained in:
@@ -242,10 +242,32 @@
|
|||||||
register: proxygroup_check
|
register: proxygroup_check
|
||||||
|
|
||||||
|
|
||||||
- name: Print proxy_check
|
- name: Print proxygroup_check
|
||||||
debug:
|
debug:
|
||||||
msg: "{{ proxygroup_check }}"
|
msg: "{{ proxygroup_check }}"
|
||||||
|
|
||||||
|
- name: Create proxy if not exists
|
||||||
|
uri:
|
||||||
|
url: "{{ zabbix_api_url }}"
|
||||||
|
method: POST
|
||||||
|
body_format: json
|
||||||
|
body:
|
||||||
|
jsonrpc: "2.0"
|
||||||
|
method: "proxygroup.create"
|
||||||
|
params:
|
||||||
|
name: "{{ clustename }}"
|
||||||
|
failover_delay: "5m"
|
||||||
|
min_online: 1
|
||||||
|
id: 1
|
||||||
|
headers:
|
||||||
|
Content-Type: "application/json"
|
||||||
|
Authorization: "Bearer {{ zabbix_auth_token }}"
|
||||||
|
when: proxygroup_check.json.result | length == 0
|
||||||
|
register: proxygroup_check2
|
||||||
|
|
||||||
|
- name: Print proxygroup_check2
|
||||||
|
debug:
|
||||||
|
msg: "{{ proxygroup_check2 }}"
|
||||||
|
|
||||||
- name: Check if proxy exists
|
- name: Check if proxy exists
|
||||||
uri:
|
uri:
|
||||||
|
|||||||
Reference in New Issue
Block a user