toansible: Add git installation
This commit is contained in:
parent
3ad81ae8ae
commit
3459a67850
3 changed files with 24 additions and 11 deletions
11
configs.yml
11
configs.yml
|
@ -29,17 +29,6 @@ git:
|
||||||
- . ./secrets &&
|
- . ./secrets &&
|
||||||
git config --global user.name "${USER}@$(uname -n)";
|
git config --global user.name "${USER}@$(uname -n)";
|
||||||
git config --global user.email "$GIT_EMAIL";
|
git config --global user.email "$GIT_EMAIL";
|
||||||
git config --global pull.rebase false;
|
|
||||||
git config --global alias.br "branch";
|
|
||||||
git config --global alias.ci "commit";
|
|
||||||
git config --global alias.co "checkout";
|
|
||||||
git config --global alias.cp "cherry-pick";
|
|
||||||
git config --global alias.st "status";
|
|
||||||
git config --global alias.logadog "log --all --decorate --oneline --graph";
|
|
||||||
git config --global alias.chlog "log --no-merges --oneline --stat @{1}..";
|
|
||||||
git config --global alias.df "diff --word-diff=color";
|
|
||||||
git config --global diff.tool vimdiff;
|
|
||||||
git config --global init.defaultBranch "main"
|
|
||||||
|
|
||||||
etckeeper:
|
etckeeper:
|
||||||
- install:
|
- install:
|
||||||
|
|
|
@ -18,3 +18,9 @@
|
||||||
copy:
|
copy:
|
||||||
src: ignore
|
src: ignore
|
||||||
dest: ~/.config/git/ignore
|
dest: ~/.config/git/ignore
|
||||||
|
|
||||||
|
- name: Copy global gitconfig
|
||||||
|
template:
|
||||||
|
src: gitconfig.j2
|
||||||
|
dest: ~/.gitconfig
|
||||||
|
backup: true
|
||||||
|
|
18
roles/git/templates/gitconfig.j2
Normal file
18
roles/git/templates/gitconfig.j2
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
[user]
|
||||||
|
name = {{ ansible_facts['env']['USER'] }}@{{ ansible_hostname }}
|
||||||
|
email = {{ git_email }}
|
||||||
|
[pull]
|
||||||
|
rebase = false
|
||||||
|
[alias]
|
||||||
|
br = branch
|
||||||
|
ci = commit
|
||||||
|
co = checkout
|
||||||
|
cp = cherry-pick
|
||||||
|
st = status
|
||||||
|
logadog = log --all --decorate --oneline --graph
|
||||||
|
chlog = log --no-merges --oneline --stat @{1}..
|
||||||
|
df = diff --word-diff=color
|
||||||
|
[diff]
|
||||||
|
tool = vimdiff
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
Loading…
Add table
Reference in a new issue