1
0

Added the base for the Ansible provisioning

This commit is contained in:
2025-10-04 07:32:14 +02:00
parent fe4c76055f
commit 6eb4b64fb8
5 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
- name: Prepare the base environment
hosts: localhost
connection: local
gather_facts: false
pre_tasks:
- name: 'Ensure the "chezmoi" variable is set'
ansible.builtin.assert:
that:
- chezmoi is not undefined
- chezmoi is mapping
fail_msg: 'Pass with: --extra-vars "$(chezmoi data --format=json)"'
- name: 'Example: access the "user" fields'
ansible.builtin.debug:
msg:
- "user: {{ chezmoi.username | default('n/a') }}"