From 4378f6903013c4f1b5ca0c7bce51da8f4674622c Mon Sep 17 00:00:00 2001 From: Ivan Golikov Date: Mon, 9 Dec 2024 23:53:02 +0100 Subject: [PATCH] Automatically adding alias for dotfiles command --- .local/share/dotfiles/install_dev_tools.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.local/share/dotfiles/install_dev_tools.yml b/.local/share/dotfiles/install_dev_tools.yml index 221eac4..5a49980 100644 --- a/.local/share/dotfiles/install_dev_tools.yml +++ b/.local/share/dotfiles/install_dev_tools.yml @@ -24,4 +24,10 @@ - gcc state: present 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