From b64f88287f4f27be10275aaa5f8ed61e83a3212e Mon Sep 17 00:00:00 2001 From: tec <tec@ucc.gu.uwa.edu.au> Date: Tue, 24 Dec 2019 18:43:12 +0800 Subject: [PATCH] Monitor_client can be a bit more ambitious with cloudalchemy.node-exporter because it does its own checks --- monitor_client.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/monitor_client.yml b/monitor_client.yml index 1701ab0..ffb4572 100644 --- a/monitor_client.yml +++ b/monitor_client.yml @@ -3,14 +3,14 @@ become: true become_user: root remote_user: root - tasks: + pre_tasks: - name: Have prometheus-node-exporter apt: name: prometheus-node-exporter state: latest - when: ansible_distribution == 'Debian' and ansible_distribution_major_version == '10' + when: ansible_facts['os_family'] == 'Debian' and ansible_distribution_major_version == '10' + - name: Gather the rpm package facts + package_facts: + manager: auto roles: - - { - role: cloudalchemy.node-exporter, - when: ansible_distribution == 'Debian' and ansible_distribution_version == '9', - } + - { role: cloudalchemy.node-exporter, when: "ansible_facts.packages['prometheus-node-exporter'] is not defined" } -- GitLab