xoxys.postfix_relay/tasks/main.yml
Robert Kaussow 3a43ecf27c
All checks were successful
continuous-integration/drone/push Build is passing
fix: refactor dynmaic vars file loading
2022-09-04 15:51:45 +02:00

27 lines
720 B
YAML

---
- include_vars: "{{ var_files }}"
vars:
var_files: "{{ lookup('first_found', params, errors='ignore') }}"
params:
files:
- "{{ ansible_lsb.id | default('') | lower }}.yml"
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version }}.yml"
- "{{ ansible_os_family | lower }}.yml"
paths:
- "vars"
when: var_files
- include_tasks: install.yml
- include_tasks: "{{ lookup('first_found', params) }}"
vars:
params:
files:
- "config_{{ ansible_lsb.id | default('') | lower }}.yml"
- "config_{{ ansible_os_family | lower }}.yml"
- "config_default.yml"
paths:
- "tasks"
- include_tasks: post_tasks.yml