node-exporter works (mostly) as expected

This commit is contained in:
Bertrand Lanson 2023-06-02 17:28:40 +02:00
parent 76fe54cd3e
commit ac4aeb5212
2 changed files with 22 additions and 9 deletions

View File

@ -24,4 +24,7 @@ deploy_adguard_node_exporter:
log_limit: 10000 log_limit: 10000
deploy_adguard_consul: deploy_adguard_consul:
enable: false enable: false
consul_protocol: http
consul_addr: 127.0.0.1:8500
consul_token: someUUIDhere
deploy_adguard_config: {} deploy_adguard_config: {}

View File

@ -10,15 +10,25 @@
notify: notify:
- systemctl-daemon-reload - systemctl-daemon-reload
- name: "Copy docker-compose.yml template" - name: "Configure docker-compose deployment"
ansible.builtin.template: block:
src: "docker-compose.yml.j2" - name: "Copy docker-compose.yml template"
dest: "{{ deploy_adguard_directory }}/docker-compose.yml" ansible.builtin.template:
owner: root src: "docker-compose.yml.j2"
group: root dest: "{{ deploy_adguard_directory }}/docker-compose.yml"
mode: '0600' owner: root
notify: group: root
- systemctl-restart-adguard mode: '0600'
notify:
- systemctl-restart-adguard
- name: "Create password file for node-exporter"
ansible.builtin.copy:
dest: "{{ deploy_adguard_directory }}/password"
content: "{{ deploy_adguard_node_exporter['password'] }}"
when: deploy_adguard_node_exporter['enable']
notify:
- systemctl-restart-adguard
- name: "Copy AdGuardHome.yaml" - name: "Copy AdGuardHome.yaml"
ansible.builtin.template: ansible.builtin.template: