Browse Source

roles/riot-web: advanced http monitoring

python3
Zolfa 5 years ago
parent
commit
2453c02fbb
Signed by: zolfa GPG Key ID: E1A43B038C4D6616
1 changed files with 22 additions and 0 deletions
  1. +22
    -0
      roles/riot-web/tasks/main.yaml

+ 22
- 0
roles/riot-web/tasks/main.yaml View File

@ -31,4 +31,26 @@
template:
src: 'config.json.j2'
dest: '/srv/riot-web/riot-{{ riot_web_version }}/config.json'
- name: 'MONITORING | add HTTP service'
block:
- name: 'MONITORING | add service to monitoring entry'
set_fact:
monitoring_entry: >
{{ monitoring_entry | default({}) | combine({
'address': ansible_host,
'vhosts_uri': { riot_web_nginx_fqdn: {'/': '<title>Riot</title>'} },
}, recursive=true) }}
- name: 'MONITORING | update monitoring facts'
set_fact:
monitoring_facts: >
{{ hostvars[monitoring_host]['monitoring_facts']
| default({})
| combine({host_fqdn: monitoring_entry}) }}
delegate_facts: true
delegate_to: '{{ monitoring_host }}'
tags:
- 'monitoring'
...
...

Loading…
Cancel
Save