[TIDY] Move to ansible_facts dict instead of injected variables

This commit is contained in:
Jannik Beyerstedt 2025-11-28 11:10:58 +01:00
parent 9f0226856e
commit 36455b7f76
18 changed files with 69 additions and 69 deletions

View file

@ -4,7 +4,7 @@
- name: Usersetup - Check, if usersetup already ran
ansible.builtin.stat:
path: "{{ ansible_user_dir }}/.ansbl-common-usersetup"
path: "{{ ansible_facts['user_dir'] }}/.ansbl-common-usersetup"
register: common_usersetup
- name: Usersetup - Change login shell to zsh for current user
@ -12,7 +12,7 @@
- not common_usersetup.stat.exists and usersetup_chsh
become: true
ansible.builtin.user:
name: "{{ ansible_user_id }}"
name: "{{ ansible_facts['user_id'] }}"
shell: /usr/local/bin/zsh
# - name: Usersetup - Install locales package
@ -41,6 +41,6 @@
when:
- not common_usersetup.stat.exists
ansible.builtin.file:
path: "{{ ansible_user_dir }}/.ansbl-common-usersetup"
path: "{{ ansible_facts['user_dir'] }}/.ansbl-common-usersetup"
state: touch
mode: "0644"