mirror of
https://gitlab.com/s3lph/ansible-collection-prometheus
synced 2024-11-23 02:01:10 +01:00
Fix first_found logic
This commit is contained in:
parent
c51066cf17
commit
a8a3042699
2 changed files with 15 additions and 13 deletions
|
@ -1,9 +1,10 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: install node exporter
|
- name: install node exporter
|
||||||
include_tasks: "install/{{ item }}.yml"
|
include_tasks: "{{ lookup('ansible.builtin.first_found', paths=['tasks/install'], files=files) }}"
|
||||||
with_first_found:
|
vars:
|
||||||
- "{% 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 %}"
|
files:
|
||||||
- "{% if 'id' in ansible_lsb %}{{ ansible_lsb.id }}{% else %}{{ ansible_distribution }}{% endif %}"
|
- "{% 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"
|
||||||
- "{{ ansible_distribution }}_{{ ansible_distribution_version }}"
|
- "{% if 'id' in ansible_lsb %}{{ ansible_lsb.id }}{% else %}{{ ansible_distribution }}{% endif %}.yml"
|
||||||
- "{{ ansible_distribution }}"
|
- "{{ ansible_distribution }}_{{ ansible_distribution_version }}.yml"
|
||||||
|
- "{{ ansible_distribution }}.yml"
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
- name: include os specific vars
|
- name: include os specific vars
|
||||||
include_vars: "{{ item }}.yml"
|
include_vars: "{{ lookup('ansible.builtin.first_found', paths=['vars'], files=files)"
|
||||||
with_first_found:
|
vars:
|
||||||
- "{% 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 %}"
|
files:
|
||||||
- "{% if 'id' in ansible_lsb %}{{ ansible_lsb.id }}{% else %}{{ ansible_distribution }}{% endif %}"
|
- "{% 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"
|
||||||
- "{{ ansible_distribution }}_{{ ansible_distribution_version }}"
|
- "{% if 'id' in ansible_lsb %}{{ ansible_lsb.id }}{% else %}{{ ansible_distribution }}{% endif %}.yml"
|
||||||
- "{{ ansible_distribution }}"
|
- "{{ ansible_distribution }}_{{ ansible_distribution_version }}.yml"
|
||||||
- "default"
|
- "{{ ansible_distribution }}.yml"
|
||||||
|
- "default.yml"
|
||||||
tags:
|
tags:
|
||||||
- "role::prometheus_node"
|
- "role::prometheus_node"
|
||||||
- "role::prometheus_node:install"
|
- "role::prometheus_node:install"
|
||||||
|
|
Loading…
Reference in a new issue