From 62143698922838318ac891e044cce7eaeaf1d4bf Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Wed, 26 May 2021 16:44:51 +0200 Subject: [PATCH] assert only for prometheus server --- tasks/asserts.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tasks/asserts.yml b/tasks/asserts.yml index e0adabd..ea35ef0 100644 --- a/tasks/asserts.yml +++ b/tasks/asserts.yml @@ -9,12 +9,18 @@ - name: 'prometheus | assert | gather the package facts' ansible.builtin.package_facts: manager: auto + when: + - prometheus_server_enable is defined + - prometheus_server_enable == "true" tags: - prometheus - name: 'prometheus | assert | check if docker-ce is installed' assert: that: "'docker-ce' in ansible_facts.packages" + when: + - prometheus_server_enable is defined + - prometheus_server_enable == "true" tags: - prometheus @@ -23,5 +29,9 @@ that: - "'python-docker' in ansible_facts.packages" - "'python3-docker' in ansible_facts.packages" + when: + - prometheus_server_enable is defined + - prometheus_server_enable == "true" tags: - prometheus +