Member-only story
Checkout git repository via SSH — Ansible module git
How to checkout a git repository via SSH using Ansible module git.
How to checkout git repository via SSH?
I’m going to show you a live demo with some simple Ansible code.
I’m Luca Berton and welcome to today’s episode of Ansible Pilot
Ansible checkout git repository
Today we’re talking about Ansible module git.
The full name is ansible.builtin.git which means is part of the collection of modules “builtin” with ansible and shipped with it.
This module is pretty stable and out for years.
The purpose is to Deploy software (or files) from git checkouts in our managed hosts.
Parameters and Return Values
The parameter list is pretty wide but I’ll summarize the most useful.
- repo path
- dest string
- update boolean
- key_file path — SSH private key