{"id":19568764,"url":"https://github.com/buluma/ansible-role-git","last_synced_at":"2026-02-26T07:29:21.696Z","repository":{"id":40693948,"uuid":"456116561","full_name":"buluma/ansible-role-git","owner":"buluma","description":"Install Git on your system","archived":false,"fork":false,"pushed_at":"2025-04-03T03:31:54.000Z","size":117,"stargazers_count":1,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-03T04:26:53.133Z","etag":null,"topics":["ansible","ansible-role","git","hacktoberfest","playbook"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buluma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"buluma"}},"created_at":"2022-02-06T10:18:18.000Z","updated_at":"2025-04-03T03:31:52.000Z","dependencies_parsed_at":"2023-02-08T17:00:28.221Z","dependency_job_id":"efc7302f-92cb-4e20-9ffe-b43e222588c2","html_url":"https://github.com/buluma/ansible-role-git","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buluma%2Fansible-role-git","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buluma%2Fansible-role-git/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buluma%2Fansible-role-git/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buluma%2Fansible-role-git/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buluma","download_url":"https://codeload.github.com/buluma/ansible-role-git/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251080744,"owners_count":21533142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-role","git","hacktoberfest","playbook"],"created_at":"2024-11-11T06:06:15.718Z","updated_at":"2026-02-26T07:29:21.691Z","avatar_url":"https://github.com/buluma.png","language":"Jinja","funding_links":["https://github.com/sponsors/buluma"],"categories":[],"sub_categories":[],"readme":"# [Ansible role git](#ansible-role-git)\n\nInstall and configure git on your system.\n\n|GitHub|GitLab|Downloads|Version|\n|------|------|---------|-------|\n|[![github](https://github.com/buluma/ansible-role-git/workflows/Ansible%20Molecule/badge.svg)](https://github.com/buluma/ansible-role-git/actions)|[![gitlab](https://gitlab.com/shadowwalker/ansible-role-git/badges/master/pipeline.svg)](https://gitlab.com/shadowwalker/ansible-role-git)|[![downloads](https://img.shields.io/ansible/role/d/buluma/git)](https://galaxy.ansible.com/buluma/git)|[![Version](https://img.shields.io/github/release/buluma/ansible-role-git.svg)](https://github.com/buluma/ansible-role-git/releases/)|\n\n## [Example Playbook](#example-playbook)\n\nThis example is taken from [`molecule/default/converge.yml`](https://github.com/buluma/ansible-role-git/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release.\n\n```yaml\n---\n- name: Converge\n  hosts: all\n  become: true\n  gather_facts: true\n\n  vars:\n    git_username: root\n    git_groupname: root\n    git_repository_destination: /root\n    git_repositories:\n    - repo: https://github.com/buluma/ansible-role-bootstrap\n      dest: bootstrap\n    - repo: https://github.com/buluma/ansible-role-bootstrap\n      dest: bootstrap-force\n      force: true\n    - repo: https://github.com/buluma/ansible-role-bootstrap\n      dest: bootstrap-version\n      version: \"v2.0.0\"\n\n  pre_tasks:\n  - name: Update apt cache.\n    apt: update_cache=true cache_valid_time=600\n    when: ansible_os_family == 'Debian'\n\n  roles:\n  - role: buluma.git\n```\n\nThe machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/buluma/ansible-role-git/blob/master/molecule/default/prepare.yml):\n\n```yaml\n---\n- name: Prepare\n  hosts: all\n  gather_facts: false\n  become: true\n  serial: 30%\n\n  roles:\n  - role: buluma.bootstrap\n```\n\nAlso see a [full explanation and example](https://buluma.github.io/how-to-use-these-roles.html) on how to use these roles.\n\n## [Role Variables](#role-variables)\n\nThe default values for the variables are set in [`defaults/main.yml`](https://github.com/buluma/ansible-role-git/blob/master/defaults/main.yml):\n\n```yaml\n---\n# defaults file for git\n\n# The system username in /home where to place the gitconfig file.\n# git_username: johndoe\n\n# The group to own directories.\n# git_groupname: \"{{ git_username }}\"\n\n# Settings for git configuration.\n# git_user_email: johndoe@example.com\n# git_user_name: John Doe\n\n# Where to place the copies of the repositories.\ngit_repository_destination: /home/{{ git_username | default('unset') }}/Documents/github.com/{{ git_username | default('unset') }}\n\n# Should git force (overwrite locally changed) clone? (Can also be controlled\n# per repository, see below.\ngit_force: false\n\n# The repositories to check out, bootstrap is pinned to a version, java will get HEAD/latest.\n# git_repositories:\n#   - repo: https://github.com/robertdebock/ansible-role-bootstrap.git\n#     dest: bootstrap\n#     version: \"2.2.4\"\n#   - repo: ssh://git@github.com/robertdebock/ansible-role-java.git\n#     dest: java\n#   - repo: ssh://git@github.com/robertdebock/ansible-role-tomcat.git\n#     dest: tomcat\n#     force: true\n```\n\n## [Requirements](#requirements)\n\n- pip packages listed in [requirements.txt](https://github.com/buluma/ansible-role-git/blob/master/requirements.txt).\n\n## [State of used roles](#state-of-used-roles)\n\nThe following roles are used to prepare a system. You can prepare your system in another way.\n\n| Requirement | GitHub | GitLab |\n|-------------|--------|--------|\n|[buluma.bootstrap](https://galaxy.ansible.com/buluma/bootstrap)|[![Build Status GitHub](https://github.com/buluma/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/buluma/ansible-role-bootstrap/actions)|[![Build Status GitLab](https://gitlab.com/shadowwalker/ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/shadowwalker/ansible-role-bootstrap)|\n\n## [Context](#context)\n\nThis role is part of many compatible roles. Have a look at [the documentation of these roles](https://buluma.github.io/) for further information.\n\nHere is an overview of related roles:\n![dependencies](https://raw.githubusercontent.com/buluma/ansible-role-git/png/requirements.png \"Dependencies\")\n\n## [Compatibility](#compatibility)\n\nThis role has been tested on these [container images](https://hub.docker.com/u/buluma):\n\n|container|tags|\n|---------|----|\n|[Alpine](https://hub.docker.com/r/buluma/alpine)|all|\n|[Amazon](https://hub.docker.com/r/buluma/amazonlinux)|all|\n|[EL](https://hub.docker.com/r/buluma/enterpriselinux)|all|\n|[Debian](https://hub.docker.com/r/buluma/debian)|all|\n|[Fedora](https://hub.docker.com/r/buluma/fedora)|all|\n|[opensuse](https://hub.docker.com/r/buluma/opensuse)|all|\n|[Ubuntu](https://hub.docker.com/r/buluma/ubuntu)|all|\n\nThe minimum version of Ansible required is 2.12, tests have been done on:\n\n- The previous version.\n- The current version.\n- The development version.\n\nIf you find issues, please register them on [GitHub](https://github.com/buluma/ansible-role-git/issues).\n\n## [License](#license)\n\n[Apache-2.0](https://github.com/buluma/ansible-role-git/blob/master/LICENSE).\n\n## [Author Information](#author-information)\n\n[buluma](https://buluma.github.io/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuluma%2Fansible-role-git","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuluma%2Fansible-role-git","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuluma%2Fansible-role-git/lists"}