Automatically adding alias for dotfiles command

This commit is contained in:
Ivan Golikov 2024-12-09 23:53:02 +01:00
parent e1bbb611da
commit 4378f69030

View file

@ -24,4 +24,10 @@
- gcc - gcc
state: present state: present
become: true become: true
when: ansible_facts['os_family'] == "Archlinux" when: ansible_facts['os_family'] == "Archlinuxs"
- name: Ensure dotfiles alias exists in .zshrc
ansible.builtin.lineinfile:
path: "{{ ansible_env.HOME }}/.zshrc"
line: "alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'"
create: yes