Refactor common dotfiles deployment and remove duplicate fastfetch

This commit is contained in:
Fabio Scotto di Santolo
2026-03-16 22:35:21 +01:00
parent d5693ffb29
commit 4a2e9d81d3
3 changed files with 17 additions and 13 deletions

View File

@@ -13,3 +13,13 @@ common_packages:
- zip - zip
- vim - vim
- fzf - fzf
common_dotfiles:
- name: .bashrc
src: .bashrc
dest: .bashrc
mode: "0644"
- name: .bash_profile
src: .bash_profile
dest: .bash_profile
mode: "0644"

View File

@@ -6,7 +6,6 @@ void_packages_base:
- vsv - vsv
- bat - bat
- delta - delta
- fastfetch
- xorg-minimal - xorg-minimal
- xorg-fonts - xorg-fonts
- elogind - elogind

View File

@@ -1,16 +1,11 @@
--- ---
- name: Copy .bashrc - name: Copy common dotfiles
ansible.builtin.copy: ansible.builtin.copy:
src: "{{ playbook_dir }}/../dotfiles/common/.bashrc" src: "{{ playbook_dir }}/../dotfiles/common/{{ item.src }}"
dest: "{{ user_home }}/.bashrc" dest: "{{ user_home }}/{{ item.dest }}"
owner: "{{ username }}" owner: "{{ username }}"
group: "{{ user_group }}" group: "{{ user_group }}"
mode: "0644" mode: "{{ item.mode }}"
loop: "{{ common_dotfiles | default([]) }}"
- name: Copy .bash_profile loop_control:
ansible.builtin.copy: label: "{{ item.dest }}"
src: "{{ playbook_dir }}/../dotfiles/common/.bash_profile"
dest: "{{ user_home }}/.bash_profile"
owner: "{{ username }}"
group: "{{ user_group }}"
mode: "0644"