Specify git config on a per-user basis.

This commit is contained in:
Tom Alexander 2022-10-27 00:22:06 -04:00
parent b69934072f
commit 6e4fffbe9d
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
4 changed files with 5 additions and 5 deletions

View File

@ -31,4 +31,4 @@ users:
- main_fido
- backup_fido
- homeassistant
gitconfig: gitconfig_home
gitconfig: "gitconfig_home"

View File

@ -14,6 +14,7 @@ users:
- main_fido
- backup_fido
- homeassistant
gitconfig: "gitconfig_home"
zfs_snapshot_datasets:
- zroot/linux/archmain/home
- zroot/linux/archmain/be
@ -21,4 +22,3 @@ graphics_driver: "intel"
build_user:
name: talexander
group: talexander
gitconfig: gitconfig_home

View File

@ -8,7 +8,7 @@
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
bh = log --oneline --branches=* --remotes=* --graph --decorate
[core]
excludesfile = /home/talexander/.gitignore_global
excludesfile = ~/.gitignore_global
[commit]
gpgsign = true
[pull]

View File

@ -8,9 +8,9 @@
mode: 0600
owner: "{{ account_name.stdout }}"
group: "{{ group_name.stdout }}"
when: gitconfig is defined
when: "users[account_name.stdout].gitconfig is defined"
loop:
- src: "{{ gitconfig }}"
- src: "{{ users[account_name.stdout].gitconfig }}"
dest: .gitconfig
- name: Copy files