[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

@ -16,8 +16,8 @@
- name: VSCode - Install and configure VS Code
ansible.builtin.include_tasks: "{{ item }}"
with_first_found:
- "devel-{{ ansible_distribution }}.yml"
- "devel-{{ (override_os_family is defined) | ternary(override_os_family, ansible_os_family) }}.yml"
- "devel-{{ ansible_facts['distribution'] }}.yml"
- "devel-{{ (override_os_family is defined) | ternary(override_os_family, ansible_facts['os_family']) }}.yml"
# Install Visual Studio Code and Set Basic Configuration
- name: VSCode - Basics
@ -73,18 +73,18 @@
mode: "0755"
- name: Devel - Golang - Create zshrc-host
ansible.builtin.file:
path: "{{ ansible_user_dir }}/.zshrc-host"
path: "{{ ansible_facts['user_dir'] }}/.zshrc-host"
state: touch
mode: "0644"
- name: Devel - Golang - Add GOPATH
ansible.builtin.lineinfile:
path: "{{ ansible_user_dir }}/.zshrc-host"
path: "{{ ansible_facts['user_dir'] }}/.zshrc-host"
line: "export GOPATH={{ user_lang_golang_gopath }}"
state: present
backup: true
- name: Devel - Golang - Add go bin to PATH
ansible.builtin.lineinfile:
path: "{{ ansible_user_dir }}/.zshrc-host"
path: "{{ ansible_facts['user_dir'] }}/.zshrc-host"
line: "export PATH=$PATH:{{ user_lang_golang_gopath }}/bin"
state: present
backup: true