You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hetzner-ansible/roles/prometheus/tasks/_reload_config.yml

30 lines
811 B
YAML

---
### tags:
### update_config
- name: "Wait for <{{ http_s }}://{{ prometheus_id }}.{{ domain }}>"
uri:
url: "{{ http_s }}://{{ prometheus_id }}.{{ domain }}"
url_username: "{{ prometheus_admin_username }}"
url_password: "{{ prometheus_admin_password }}"
method: GET
status_code: 200
return_content: yes
register: prometheus_stats
until: prometheus_stats.status == 200
retries: 10
delay: 60
tags:
- update_config
- name: "Reload prometheus configuration"
uri:
url: "{{ http_s }}://{{ prometheus_id }}.{{ domain }}/-/reload"
url_username: "{{ prometheus_admin_username }}"
url_password: "{{ prometheus_admin_password }}"
method: POST
timeout: 300 # blocks until reload configuration is complete
status_code: 200
tags:
- update_config