manala.git

#######################################################################################################

:exclamation: DEPRECATION :exclamation:

This repository and its associated role are no longer maintained. Please use the Manala Ansible Collection instead.

For information on how to use it, check the collection repository.

#######################################################################################################

Ansible Role: Git Build Status

:exclamation: Please report issues and submit Pull Requests at the main Ansible Role repository :exclamation:

This role is for setting up and configuring Git by:

  • Installing the Git package
  • Setting up the gitconfig file
  • Allowing configuration of the gitconfig file

It's part of the Manala Ansible stack but can be used independently.

Requirements

None.

Dependencies

None.

Installation

Ansible 2+

Using the ansible galaxy command line:

ansible-galaxy install manala.git

Using an ansible galaxy requirements file:

- src: manala.git

Role Handlers

None

Role Variables

Name Default Type Description
manala_git_install_packages ~ Array Dependency packages to install
manala_git_install_packages_default ['git'] Array Default dependency packages to install
manala_git_config_file '/etc/gitconfig' String Path to the configuration file
manala_git_config_template 'config/empty.j2' String Path to the configuration template
manala_git_config ~ Array/String Git configuration options
manala_git_repositories [] Array List of repositories to check out

Git Configuration

The manala_git_config_file variable lets you specify the path to the config file.

Experienced users can use their own template with the manala_git_config_template variable.

Use a template:

manala_git_config_template: my/gitconfig.j2
manala_git_config:
  foo: bar

Use dictionary parameters:

manala_git_config:
  user:
    name: Foo Bar
    email: [email protected]
  core:
    filemode: false

Use raw config:

manala_git_config: |
  [user]
      name = Foo Bar
      email = [email protected]
  [core]
      filemode = false

Use array of dictionaries (deprecated):

manala_git_config:
  - user:
    - name: Foo Bar
    - email: [email protected]
  - core:
    - filemode: false

Automatic Checkout of Required Repositories

The manala_git_repositories variable allows automatic checkout of specified repositories:

Variables

Name Default Type Description
repo ~ (required) String Address of the Git repository using git, SSH, or HTTP protocol
dest ~ (required) String Absolute path where the repository will be checked out
version HEAD String The version of the repository to check out
update true Boolean If false, do not get new updates from the origin repository
user ~ String User to check out the repository as

Example:

manala_git_repositories:
  - repo:    https://github.com/symfony/symfony1.git
    dest:    /usr/share/symfony/symfony-1.4
    version: v1.4.20
    update:  false
    user:    app

Example Playbook

- hosts: servers
  roles:
    - role: manala.git

License

MIT

Author Information

Manala (http://www.manala.io/)

Informazioni sul progetto

Handle git

Installa
ansible-galaxy install manala.git
Licenza
Unknown
Download
7.7k
Proprietario
Manala is an open source project supported by the french web agency ELAO providing advanced ansible roles for website's infrastructures and far more.