fix: update gitconfig symlink for mennos-desktop to point to WSL configuration and add tag for ansible task

This commit is contained in:
2025-07-16 01:27:28 +02:00
parent 6dbe114d83
commit 30715d7326

View File

@@ -1,9 +1,11 @@
--- ---
- name: Set user home directory - name: Server setup
block:
- name: Set user home directory
ansible.builtin.set_fact: ansible.builtin.set_fact:
user_home: "{{ ansible_env.HOME if ansible_user_id == 'root' else lookup('env', 'HOME') }}" user_home: "{{ ansible_env.HOME if ansible_user_id == 'root' else lookup('env', 'HOME') }}"
- name: Create basic symlinks - name: Create basic symlinks
ansible.builtin.file: ansible.builtin.file:
src: "{{ item.src | replace('~', user_home) | replace('$DOTFILES_PATH', lookup('env', 'DOTFILES_PATH')) }}" src: "{{ item.src | replace('~', user_home) | replace('$DOTFILES_PATH', lookup('env', 'DOTFILES_PATH')) }}"
dest: "{{ item.dest | replace('~', user_home) }}" dest: "{{ item.dest | replace('~', user_home) }}"
@@ -16,7 +18,7 @@
- { src: "$DOTFILES_PATH/config/starship.toml", dest: "~/.config/starship.toml" } - { src: "$DOTFILES_PATH/config/starship.toml", dest: "~/.config/starship.toml" }
- { src: "$DOTFILES_PATH/.bashrc", dest: "~/.bashrc.extra" } - { src: "$DOTFILES_PATH/.bashrc", dest: "~/.bashrc.extra" }
- name: Create gitconfig symlink - name: Create gitconfig symlink
ansible.builtin.file: ansible.builtin.file:
src: "{{ gitconfig_mapping[inventory_hostname] | replace('~', user_home) | replace('$DOTFILES_PATH', lookup('env', 'DOTFILES_PATH')) }}" src: "{{ gitconfig_mapping[inventory_hostname] | replace('~', user_home) | replace('$DOTFILES_PATH', lookup('env', 'DOTFILES_PATH')) }}"
dest: "{{ user_home }}/.gitconfig" dest: "{{ user_home }}/.gitconfig"
@@ -25,9 +27,11 @@
follow: false follow: false
vars: vars:
gitconfig_mapping: gitconfig_mapping:
mennos-desktop: "$DOTFILES_PATH/config/git/gitconfig.linux" mennos-desktop: "$DOTFILES_PATH/config/git/gitconfig.wsl"
mennos-laptop-w: "$DOTFILES_PATH/config/git/gitconfig.wsl" mennos-laptop-w: "$DOTFILES_PATH/config/git/gitconfig.wsl"
mennos-server: "$DOTFILES_PATH/config/git/gitconfig.mennos-server" mennos-server: "$DOTFILES_PATH/config/git/gitconfig.mennos-server"
mennos-cloud-server: "$DOTFILES_PATH/config/git/gitconfig.mennos-server" mennos-cloud-server: "$DOTFILES_PATH/config/git/gitconfig.mennos-server"
mennos-vm: "$DOTFILES_PATH/config/git/gitconfig.mennos-server" mennos-vm: "$DOTFILES_PATH/config/git/gitconfig.mennos-server"
dotfiles-test: "$DOTFILES_PATH/config/git/gitconfig.mennos-server" dotfiles-test: "$DOTFILES_PATH/config/git/gitconfig.mennos-server"
tags:
- symlinks