From ac4aeb52126a79e8467ce1360dc7865c12c5bbff Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Fri, 2 Jun 2023 17:28:40 +0200 Subject: [PATCH] node-exporter works (mostly) as expected --- defaults/main.yml | 3 +++ tasks/configure.yml | 28 +++++++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 8622d1f..c9d701e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -24,4 +24,7 @@ deploy_adguard_node_exporter: log_limit: 10000 deploy_adguard_consul: enable: false + consul_protocol: http + consul_addr: 127.0.0.1:8500 + consul_token: someUUIDhere deploy_adguard_config: {} diff --git a/tasks/configure.yml b/tasks/configure.yml index a06d63e..2cfc757 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -10,15 +10,25 @@ notify: - systemctl-daemon-reload -- name: "Copy docker-compose.yml template" - ansible.builtin.template: - src: "docker-compose.yml.j2" - dest: "{{ deploy_adguard_directory }}/docker-compose.yml" - owner: root - group: root - mode: '0600' - notify: - - systemctl-restart-adguard +- name: "Configure docker-compose deployment" + block: + - name: "Copy docker-compose.yml template" + ansible.builtin.template: + src: "docker-compose.yml.j2" + dest: "{{ deploy_adguard_directory }}/docker-compose.yml" + owner: root + group: root + 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" ansible.builtin.template: