semanticbeeng.ansible_role_git
Ansible Role: Git
This Ansible role installs Git, a tool for version control, on any RHEL/CentOS or Debian/Ubuntu Linux system.
Requirements
None.
Role Variables
Here are the variables you can use, along with their default values (found in defaults/main.yml
):
workspace:
/root
This is where files will be downloaded and organized before installing Git, if needed.
git_enablerepo:
""
Use this variable along with
git_packages
to install Git from a specificyum
repo ifgit_install_from_source
is false (only for CentOS). You can also use additional repositories you have installed to get a newer version of Git.git_packages:
- git
- git-svn
These are the specific Git packages to be installed. By default,
git-svn
is included, but you can change this in your playbook by removinggit-svn
if you don't want it.git_install_from_source:
false
This determines if Git should be installed from source. If set to
true
, you must provide agit_version
, which will be used to install a specific version of Git (you can find available versions at: https://www.kernel.org/pub/software/scm/git/). Thegit_install_path
shows where Git will be installed.git_install_from_source_force_update:
false
If Git is already installed at an older version and
git_install_from_source
is set to true, this will force it to update.
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 semanticbeeng.ansible_role_git