Use git_config module instead of static .gitconfig

This commit is contained in:
Anthony Rose 2019-11-28 12:34:22 +00:00
parent aea5ad970c
commit 844cbf8343
4 changed files with 77 additions and 30 deletions

View file

@ -1,26 +0,0 @@
[pull]
rebase = true
[push]
default = simple
[color]
ui = auto
[credential]
helper = store
[alias]
ci = commit
co = checkout
ff = merge --ff-only
graph = log --graph --oneline --all
l1 = log --pretty=oneline
last = log -1 HEAD --pretty=fuller
unstage = reset HEAD --
up = pull --rebase
[gui]
encoding = utf-8
recentrepo = /home/acp/data/he
[guitool "Rebase"]
cmd = rebase
[user]
name = Anthony Perkins
email = anthony@acperkins.com

View file

@ -3,10 +3,6 @@
copy: copy:
src: gemrc src: gemrc
dest: "{{ ansible_env.HOME }}/.gemrc" dest: "{{ ansible_env.HOME }}/.gemrc"
- name: Copy .gitconfig
copy:
src: gitconfig
dest: "{{ ansible_env.HOME }}/.gitconfig"
- name: Remove .hushlogin - name: Remove .hushlogin
file: file:
path: "{{ ansible_env.HOME }}/.hushlogin" path: "{{ ansible_env.HOME }}/.hushlogin"

View file

@ -0,0 +1,76 @@
---
- name: pull.rebase
git_config:
name: pull.rebase
value: true
scope: global
- name: push.default
git_config:
name: push.default
value: simple
scope: global
- name: color.ui
git_config:
name: color.ui
value: auto
scope: global
- name: credential.helper
git_config:
name: credential.helper
value: store
scope: global
- name: gui.encoding
git_config:
name: gui.encoding
value: utf-8
scope: global
- name: guitool.Rebase.cmd
git_config:
name: guitool.Rebase.cmd
value: rebase
scope: global
- name: user.name
git_config:
name: user.name
value: Anthony Perkins
scope: global
- name: alias.ci
git_config:
name: alias.ci
value: commit
scope: global
- name: alias.co
git_config:
name: alias.co
value: checkout
scope: global
- name: alias.ff
git_config:
name: alias.ff
value: merge --ff-only
scope: global
- name: alias.graph
git_config:
name: alias.graph
value: log --graph --oneline --all
scope: global
- name: alias.l1
git_config:
name: alias.l1
value: log --pretty=oneline
scope: global
- name: alias.last
git_config:
name: alias.last
value: log -1 HEAD --pretty=fuller
scope: global
- name: alias.unstage
git_config:
name: alias.unstage
value: reset HEAD --
scope: global
- name: alias.up
git_config:
name: alias.up
value: pull --rebase
scope: global

View file

@ -3,5 +3,6 @@
- include: dotfiles.yml - include: dotfiles.yml
- include: shell.yml - include: shell.yml
- include: gitconfig.yml
- include: vim.yml - include: vim.yml
- include: ssh-authorized-keys.yml - include: ssh-authorized-keys.yml