Ansible role to configure the global gitconfig and .gitignore.
# Sections and key-value pairs to include in the users .git-config
ansible_git_config: {
dest: "/home/feffi/.gitconfig",
config: {
<section>: {
<key>: <value>,
<key>: <value>,
...
}
},
# Lines to be included in users global .gitignore file
ignores: [
".vagrant"
".DS_Store"
]
Example:
- hosts: all
vars:
ansible_git_config:
dest: "/home/feffi/.gitconfig"
config:
user:
name: Your Name
email: your-email@example.org
ignores:
- ".vagrant"
- ".DS_Store"
roles:
- { role: ansible-git-config }