|
|
|
@ -57,19 +57,6 @@
|
|
|
|
tags:
|
|
|
|
tags:
|
|
|
|
- update_deployment
|
|
|
|
- update_deployment
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Deploy service templates for {{ inventory_hostname }}"
|
|
|
|
|
|
|
|
include_role:
|
|
|
|
|
|
|
|
name: sma_deploy
|
|
|
|
|
|
|
|
tasks_from: templates
|
|
|
|
|
|
|
|
vars:
|
|
|
|
|
|
|
|
current_config: "prometheus"
|
|
|
|
|
|
|
|
current_base_path: "{{ service_base_path }}"
|
|
|
|
|
|
|
|
current_destination: "{{ inventory_hostname }}"
|
|
|
|
|
|
|
|
current_owner: "{{ docker_owner }}"
|
|
|
|
|
|
|
|
current_group: "{{ docker_group }}"
|
|
|
|
|
|
|
|
tags:
|
|
|
|
|
|
|
|
- update_config
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Update {{ inventory_hostname }}"
|
|
|
|
- name: "Update {{ inventory_hostname }}"
|
|
|
|
community.docker.docker_compose:
|
|
|
|
community.docker.docker_compose:
|
|
|
|
project_src: '{{ service_base_path }}/{{ inventory_hostname }}'
|
|
|
|
project_src: '{{ service_base_path }}/{{ inventory_hostname }}'
|
|
|
|
@ -78,29 +65,8 @@
|
|
|
|
tags:
|
|
|
|
tags:
|
|
|
|
- update_deployment
|
|
|
|
- update_deployment
|
|
|
|
|
|
|
|
|
|
|
|
- name: "Wait for <{{ http_s }}://{{ prometheus_id }}.{{ domain }}>"
|
|
|
|
- name: "Updating prometheus configuration"
|
|
|
|
uri:
|
|
|
|
include_tasks: _update_config.yml
|
|
|
|
url: "{{ http_s }}://{{ prometheus_id }}.{{ domain }}"
|
|
|
|
|
|
|
|
url_username: "{{ prometheus_admin_username }}"
|
|
|
|
|
|
|
|
url_password: "{{ prometheus_admin_password_unencrypted }}"
|
|
|
|
|
|
|
|
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_unencrypted }}"
|
|
|
|
|
|
|
|
method: POST
|
|
|
|
|
|
|
|
timeout: 300 # blocks until reload configuration is complete
|
|
|
|
|
|
|
|
status_code: 200
|
|
|
|
|
|
|
|
tags:
|
|
|
|
tags:
|
|
|
|
- update_config
|
|
|
|
- update_config
|
|
|
|
|
|
|
|
|
|
|
|
|