Ansible role to manage git repositories.
- Ansible 2.3
- git
hash_behaviour = merge
Just add the role to your requirements.yml
file:
- src: https://github.com/feffi/ansible-git-repos.git
name: ansible-git-repos
All role based variables are listed below, along with default values:
ansible_git_repos: {
# Containment directory for pulled git repositories
containment: "{{ ansible_env.HOME + '/workspace' }}",
# The owner of the repositories
owner: "feffi",
# Git repositories to pull
repositories: []
}
None.
- hosts: all
vars:
ansible_git_repos:
containment: "{{ ansible_env.HOME + '/workspace' }}"
owner:
name: "feffi"
group: "feffi"
repositories: []
roles:
- { role: ansible-git-repos }
Or with local parameters:
- hosts: all
roles:
- { role: ansible-git-repos,
ansible_git_repos: {
containment: "{{ ansible_env.HOME + '/workspace' }}",
owner: {
name: "feffi",
group: "feffi"
},
repositories: []
}
}