refactor: migrate to role-based variable management and blockinfile config
This commit is contained in:
@@ -7,17 +7,15 @@
|
||||
state: present
|
||||
|
||||
- name: Remove existing config files before stowing
|
||||
shell: |
|
||||
[ -L ~/.config/hypr/hyprland.conf ] || rm -f ~/.config/hypr/hyprland.conf
|
||||
[ -L ~/.config/starship ] || rm -rf ~/.config/starship
|
||||
[ -L ~/.config/zellij ] || rm -rf ~/.config/zellij
|
||||
changed_when: false
|
||||
file:
|
||||
path: "{{ archsetup_user_home }}/.config/{{ item }}"
|
||||
state: absent
|
||||
loop:
|
||||
- hypr
|
||||
- zellij
|
||||
|
||||
- name: Create symlinks with stow
|
||||
shell: |
|
||||
cd {{ lookup('env', 'HOME') }}/archsetup/dotfiles
|
||||
stow -t ~ hypr starship zellij
|
||||
command: stow --target={{ archsetup_user_home }} {{ dotfiles_stow_packages | join(' ') }}
|
||||
args:
|
||||
executable: /bin/bash
|
||||
creates: "{{ lookup('env', 'HOME') }}/.config/starship"
|
||||
chdir: "{{ lookup('env', 'HOME') }}/archsetup/dotfiles"
|
||||
creates: "{{ archsetup_user_home }}/.config/hypr"
|
||||
chdir: "{{ archsetup_dir }}/dotfiles"
|
||||
|
||||
Reference in New Issue
Block a user