geerlingguy.git
Ansible Role: Git
This role installs Git, a system for tracking changes in files, on RHEL/CentOS or Debian/Ubuntu Linux systems.
Requirements
None.
Role Variables
Here are the available settings (variables) you can use:
workspace: /root
This is where files will be downloaded and set up before installing Git, if necessary.
git_enablerepo: ""
Use this variable along with git_packages
to install Git from a specific yum
repository if git_install_from_source
is false (for CentOS only). You can add other repositories for a newer or different version of Git.
git_packages:
- git
These are the Git packages that will be installed. By default, only git
is included, but you can add other Git-related packages like git-svn
if you want.
git_install_from_source: false
git_install_path: "/usr"
git_version: "2.26.0"
This setting determines if Git should be installed from the source code. If set to true
, you need to specify git_version
for the specific version of Git you want to install (see available versions here: https://www.kernel.org/pub/software/scm/git/). The git_install_path
shows where Git will be installed.
git_install_from_source_force_update: false
If there is an older version of Git already installed, this forces a new build from source but only applies if git_install_from_source
is true
.
Dependencies
None.
Example Playbook
- hosts: servers
roles:
- { role: geerlingguy.git }
License
MIT / BSD
Author Information
This role was created in 2014 by Jeff Geerling, the author of Ansible for DevOps.
ansible-galaxy install geerlingguy.git