feffi / ansible-git-repos

Ansible role to manage git repositories.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ansible-git-repos

Ansible role to manage git repositories.

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

Requirements

  • Ansible 2.3
  • git

ansible.cfg

hash_behaviour = merge

Install

Just add the role to your requirements.yml file:

- src: https://github.com/feffi/ansible-git-repos.git
  name: ansible-git-repos

Role Variables

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: []
}

Dependencies

None.

Example Playbook

    - 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: []
            }
          }

About

Ansible role to manage git repositories.

License:MIT License