Install Git on Unix/Linux machines with Ansible.
Run ansible-galaxy install charlesrocket.git
or use requirements.yml
:
roles:
- name: charlesrocket.git
- name: Playbook
hosts: all
roles:
- charlesrocket.git
Define the following variables to deploy the credential helper:
git_repo_destination: "~/gitlab/git" # git repository destination
git_helper_directory: "~/bin" # helper directory
git_helper: ["netrc"]
- Add
git_repo_shallow: true
to use shallow clone. - Add
git_repo_force: true
to override local modifications.