Skip to content

Commit 35d9fb5

Browse files
committed
✨ feat: add 'git_settings' options + 'git_include_paths'
1 parent 84907e8 commit 35d9fb5

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

roles/ansible-role-wsl2/defaults/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@ git_settings: []
6161
# value: true
6262
# - name: rerere.autoUpdate
6363
# value: true
64+
65+
git_paths: []
66+
# git_paths:
67+
# - ~/.config/delta/themes/themes.gitconfig

roles/ansible-role-wsl2/tasks/configure_git.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@
2424
with_items: "{{ git_settings }}"
2525
when: git_settings | length > 0
2626

27+
- name: Include specific paths to .gitconfig
28+
community.general.git_config:
29+
name: include.path
30+
value: "{{ item }}"
31+
add_mode: add
32+
scope: global
33+
loop: "{{ git_include_paths }}"
34+
when: git_include_paths | length > 0
35+
2736
- name: Setup git credential helper fact
2837
ansible.builtin.set_fact:
2938
git_credential_helper: "{{ __git_credential_helper }}"

vars/default.config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ git_settings:
9595
- name: user.signingkey
9696
value: ~/.ssh/id_ed25519.pub
9797

98+
git_include_paths: []
99+
98100
dotfiles_repo: https://github.com/jacquindev/dotfiles.git
99101
dotfiles_repo_version: master
100102
dotfiles_repo_accept_hostkey: true

0 commit comments

Comments
 (0)