ansible all -m git -a 'repo=https://github.com/example/app.git dest=/srv/app'
Clone or update a repository on every host
Uses the git module to ensure /srv/app on each host is a checkout of the given repository, cloning or pulling as needed. Idempotent by design, it is the standard way to deploy code from version control. Related: ansible-playbook site.yml.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.