Fix deprecated includes
This commit is contained in:
@ -1,15 +1,27 @@
|
||||
---
|
||||
- name: gather OS specific variables
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
|
||||
- "{{ ansible_distribution }}.yaml"
|
||||
- "{{ ansible_os_family }}.yaml"
|
||||
ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', params) }}"
|
||||
vars:
|
||||
params:
|
||||
files:
|
||||
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
|
||||
- "{{ ansible_distribution }}.yaml"
|
||||
- "{{ ansible_os_family }}.yaml"
|
||||
- "default.yaml"
|
||||
paths:
|
||||
- vars
|
||||
|
||||
- name: run os specific tasks
|
||||
include: "{{ item }}"
|
||||
with_first_found:
|
||||
- "{{ ansible_os_family }}.yaml"
|
||||
ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', params) }}"
|
||||
vars:
|
||||
params:
|
||||
files:
|
||||
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yaml"
|
||||
- "{{ ansible_distribution }}.yaml"
|
||||
- "{{ ansible_os_family }}.yaml"
|
||||
- "default.yaml"
|
||||
paths:
|
||||
- tasks
|
||||
|
||||
- name: set hostname
|
||||
hostname:
|
||||
|
Reference in New Issue
Block a user