fix: refactor dynmaic vars file loading
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Robert Kaussow 2022-09-04 15:51:45 +02:00
parent 240b7d3b94
commit 3a43ecf27c
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 12 additions and 2 deletions

View File

@ -1,13 +1,15 @@
---
- include_vars: "{{ lookup('first_found', params) }}"
- 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"
- default.yml
paths:
- "vars"
when: var_files
- include_tasks: install.yml

8
vars/redhat.yml Normal file
View File

@ -0,0 +1,8 @@
---
__postfix_relay_packages:
- postfix
- cyrus-sasl-plain
- mailx
__postfix_relay_daemon_directory: /usr/libexec/postfix
__postfix_relay_smtp_tls_cafile: /etc/ssl/certs/ca-bundle.crt