2021-04-29 18:53:56 +02:00
|
|
|
---
|
2022-11-11 21:08:07 +01:00
|
|
|
- name: 'assert | check if ansible version >= 2.7'
|
2021-04-29 18:53:56 +02:00
|
|
|
assert:
|
|
|
|
that: ansible_version.full is version_compare(2.7, '>=')
|
|
|
|
msg: Ansible version 2.7 or later is required to use this version of the role
|
|
|
|
tags:
|
|
|
|
- prometheus
|
|
|
|
|
2022-11-11 21:08:07 +01:00
|
|
|
- name: 'assert | gather the package facts'
|
2021-04-29 18:53:56 +02:00
|
|
|
ansible.builtin.package_facts:
|
|
|
|
manager: auto
|
2021-05-26 16:44:51 +02:00
|
|
|
when:
|
|
|
|
- prometheus_server_enable is defined
|
|
|
|
- prometheus_server_enable == "true"
|
2021-04-29 18:53:56 +02:00
|
|
|
tags:
|
|
|
|
- prometheus
|
|
|
|
|
2022-11-11 21:08:07 +01:00
|
|
|
- name: 'assert | check if docker-ce is installed'
|
2021-04-29 18:53:56 +02:00
|
|
|
assert:
|
|
|
|
that: "'docker-ce' in ansible_facts.packages"
|
2021-05-26 16:44:51 +02:00
|
|
|
when:
|
|
|
|
- prometheus_server_enable is defined
|
|
|
|
- prometheus_server_enable == "true"
|
2021-04-29 18:53:56 +02:00
|
|
|
tags:
|
|
|
|
- prometheus
|
2021-05-25 18:25:22 +02:00
|
|
|
|
2022-11-11 21:08:07 +01:00
|
|
|
- name: 'assert | check if docker pyhon libraries are installed'
|
2021-05-25 18:25:22 +02:00
|
|
|
assert:
|
|
|
|
that:
|
2021-11-15 18:04:43 +01:00
|
|
|
#- "'python-docker' in ansible_facts.packages"
|
2021-05-25 18:25:22 +02:00
|
|
|
- "'python3-docker' in ansible_facts.packages"
|
2021-05-26 16:44:51 +02:00
|
|
|
when:
|
|
|
|
- prometheus_server_enable is defined
|
|
|
|
- prometheus_server_enable == "true"
|
2021-05-25 18:25:22 +02:00
|
|
|
tags:
|
|
|
|
- prometheus
|