feffi / ansible-git-config

Ansible role to configure the global gitconfig and .gitignore.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ansible-git-config

Ansible role to configure the global gitconfig and .gitignore.

Build Status Github All Releases GitHub forks GitHub stars GitHub watchers Twitter Follow License

Role Defaults Variables

# 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 }

About

Ansible role to configure the global gitconfig and .gitignore.

License:MIT License