Remove kuma
This commit is contained in:
parent
3e79200852
commit
13b83c3ce9
|
@ -30,42 +30,3 @@
|
|||
tags:
|
||||
- resign
|
||||
|
||||
- name: Login with credentials once and register the result
|
||||
lucasheld.uptime_kuma.login:
|
||||
api_url: "{{ kuma_url }}"
|
||||
api_username: "{{ kuma_username }}"
|
||||
api_password: "{{ kuma_password }}"
|
||||
register: result
|
||||
become: yes
|
||||
become_user : "ansible"
|
||||
become_method: su
|
||||
become_flags: '-s /bin/bash'
|
||||
delegate_to: "127.0.0.1"
|
||||
tags:
|
||||
- resign
|
||||
|
||||
- name: Extract the token from the result and set it as fact
|
||||
set_fact:
|
||||
api_token: "{{ result.token }}"
|
||||
tags:
|
||||
- resign
|
||||
|
||||
- name: Login by token and create a monitor
|
||||
lucasheld.uptime_kuma.monitor:
|
||||
api_url: https://kuma.dryusdan.net
|
||||
api_token: "{{ api_token }}"
|
||||
name: "{{ item.monitoring_name }}"
|
||||
type: http
|
||||
url: "{{ item.monitoring_url }}"
|
||||
state: absent
|
||||
loop: "{{ nginx_vhost }}"
|
||||
become: yes
|
||||
become_user : "ansible"
|
||||
become_method: su
|
||||
become_flags: '-s /bin/bash'
|
||||
delegate_to: "127.0.0.1"
|
||||
when:
|
||||
- item.state == "absent"
|
||||
tags:
|
||||
- resign
|
||||
|
||||
|
|
Loading…
Reference in New Issue