2024-10-06 21:24:57 +02:00
|
|
|
---
|
|
|
|
- hosts: localhost
|
2024-10-15 09:56:08 +02:00
|
|
|
pre_tasks:
|
|
|
|
- name: Host | Check if host variables exist
|
|
|
|
ansible.builtin.stat:
|
|
|
|
path: "host_vars/{{ ansible_hostname }}.yml"
|
|
|
|
register: host_file
|
|
|
|
tags: always
|
|
|
|
|
|
|
|
- name: Host | Get host specific variables
|
|
|
|
include_vars:
|
|
|
|
file: "host_vars/{{ ansible_hostname }}.yml"
|
|
|
|
when: host_file.stat.exists
|
|
|
|
tags: always
|
2024-10-06 21:24:57 +02:00
|
|
|
roles:
|
|
|
|
# install packages
|
|
|
|
- role: packages
|
|
|
|
# set up config
|
|
|
|
- role: config
|