ansible-role-common/tasks/usersetup.yml
Jannik Beyerstedt 085a446b05 refactor: Use custom loop_var in with_first_found invocations
Otherwise "item" will already be bound when it's used somewhere in the included tasks
2026-03-20 12:12:13 +01:00

11 lines
492 B
YAML

---
# Common/Usersetup: Auto-setup a user shell and prepare dotfiles.
# Will run once per user, because of lockfile `~/.ansbl-common-usersetup`
- name: Usersetup - Run setup tasks
ansible.builtin.include_tasks: "{{ with_first_found_item }}"
with_first_found:
- "usersetup-{{ ansible_facts['distribution'] }}.yml"
- "usersetup-{{ (override_os_family is defined) | ternary(override_os_family, ansible_facts['os_family']) }}.yml"
loop_control:
loop_var: with_first_found_item