2023-10-22 18:31:32 +02:00
|
|
|
---
|
|
|
|
- name: "set the user variables"
|
|
|
|
ansible.builtin.import_role:
|
|
|
|
name: "services/include"
|
|
|
|
vars_from: "user"
|
|
|
|
|
|
|
|
- block:
|
|
|
|
|
|
|
|
- name: "{{ services_service_name }} : configure hosts file"
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "hosts"
|
|
|
|
dest: "{{ services_service_user_home }}/.config/service/hosts"
|
|
|
|
mode: 0644
|
|
|
|
register: services_deploy_metrics_hosts_file
|
|
|
|
|
|
|
|
- name: "{{ services_service_name }} : configure prometheus"
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: "prometheus.yml"
|
|
|
|
dest: "{{ services_service_user_home }}/.config/service/prometheus.yml"
|
|
|
|
mode: 0644
|
|
|
|
register: services_deploy_metrics_prometheus_file
|
|
|
|
|
|
|
|
become_user: "{{ services_service_user_name }}"
|
2023-11-11 21:54:08 +01:00
|
|
|
|
|
|
|
- name: "{{ services_service_name }} : configure systemd service"
|
|
|
|
ansible.builtin.include_role:
|
|
|
|
name: "services/deploy/pod"
|
|
|
|
vars:
|
|
|
|
services_deploy_pod_needs_restart: "{{
|
|
|
|
services_deploy_metrics_hosts_file.changed or
|
|
|
|
services_deploy_metrics_prometheus_file.changed
|
|
|
|
}}"
|