https://github.com/darkwizard242/ansible-role-git
Ansible role for Git. Available on Ansible Galaxy.
https://github.com/darkwizard242/ansible-role-git
ansible ansible-galaxy ansible-role git os unix version-control-system
Last synced: 8 months ago
JSON representation
Ansible role for Git. Available on Ansible Galaxy.
- Host: GitHub
- URL: https://github.com/darkwizard242/ansible-role-git
- Owner: darkwizard242
- License: mit
- Created: 2019-07-23T21:24:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-21T21:19:25.000Z (over 1 year ago)
- Last Synced: 2025-05-18T21:35:30.550Z (9 months ago)
- Topics: ansible, ansible-galaxy, ansible-role, git, os, unix, version-control-system
- Language: Python
- Homepage: https://galaxy.ansible.com/darkwizard242/git
- Size: 48.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/darkwizard242/ansible-role-git/actions?query=workflow%3Abuild-and-test) [](https://github.com/darkwizard242/ansible-role-git/actions?query=workflow%3Arelease)  [](https://sonarcloud.io/dashboard?id=ansible-role-git) [](https://sonarcloud.io/dashboard?id=ansible-role-git) [](https://sonarcloud.io/dashboard?id=ansible-role-git)  
# Ansible Role: git
Role to install (_by default_) [git](https://git-scm.com/) package or uninstall (_if passed as var_) on **Debian**, **Ubuntu** and **CentOS** systems.
## Requirements
None.
## Role Variables
Available variables are listed below (located in `defaults/main.yml`):
### Variables list:
```yaml
git_app: git
git_desired_state: present
```
### Variables table:
Variable | Description
----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------
git_app | Defines the app to install i.e. **git**
git_desired_state | Defined to dynamically chose whether to install (i.e. either `present` or `latest`) or uninstall (i.e. `absent`) the package. Defaults to `present`.
## Dependencies
None
## Example Playbook
For default behaviour of role (i.e. installation of **git** package) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.git
```
For customizing behavior of role (i.e. installation of latest **git** package) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.git
vars:
git_desired_state: latest
```
For customizing behavior of role (i.e. un-installation of **git** package) in ansible playbooks.
```yaml
- hosts: servers
roles:
- darkwizard242.git
vars:
git_desired_state: absent
```
## License
[MIT](https://github.com/darkwizard242/ansible-role-git/blob/master/LICENSE)
## Author Information
This role was created by [Ali Muhammad](https://www.alimuhammad.dev/).