1
0
Fork 0
mirror of https://gitlab.com/s3lph/ansible-collection-prometheus synced 2024-10-23 11:56:59 +02:00
ansible-collection-prometheus/roles/prometheus_node/tasks/main.yml

35 lines
1.2 KiB
YAML
Raw Normal View History

2020-11-13 10:36:46 +01:00
---
- name: include os specific vars
2021-11-03 10:58:24 +01:00
include_vars: "{{ lookup('ansible.builtin.first_found', paths=['vars'], files=files) }}"
2021-11-03 10:57:44 +01:00
vars:
files:
- "{% if 'id' in ansible_lsb %}{{ ansible_lsb.id }}{% else %}{{ ansible_distribution }}{% endif %}_{% if 'major_release' in ansible_lsb %}{{ ansible_lsb.major_release }}{% else %}{{ ansible_distribution_version }}{% endif %}.yml"
- "{% if 'id' in ansible_lsb %}{{ ansible_lsb.id }}{% else %}{{ ansible_distribution }}{% endif %}.yml"
- "{{ ansible_distribution }}_{{ ansible_distribution_version }}.yml"
- "{{ ansible_distribution }}.yml"
- "default.yml"
2020-11-13 10:36:46 +01:00
tags:
- "role::prometheus_node"
- "role::prometheus_node:install"
- "role::prometheus_node:collectors"
- "role::prometheus_node:config"
2020-11-13 10:36:46 +01:00
- name: install node exporter
2021-11-03 10:45:45 +01:00
import_tasks: install.yml
2020-11-13 10:36:46 +01:00
tags:
- "role::prometheus_node"
- "role::prometheus_node:install"
2020-11-13 10:36:46 +01:00
- name: install custom textfile collectors
import_tasks: collectors.yml
tags:
- "role::prometheus_node"
- "role::prometheus_node:collectors"
- name: configure prometheus node exporter
import_tasks: config.yml
tags:
- "role::prometheus_node"
- "role::prometheus_node:config"