Playbook on sending gitconfig
Updated Dec 06, 2020 ·
Overview
This lab turns the Git configuration copy workflow into a reusable playbook that can be run against the inventory.
Diagram:

In our playbooks directory, let's create sample-check-git.yml
# Here we're converting the adhoc command to a neat playbook.
# ansible -m copy -a "src=master.gitconfig dest=~/new.gitconfig" localhost
---
- name: Ensure master.gitconfig is copied to ~/new1.gitconfig
hosts: localhost
tasks:
- copy:
src="~/proj-ansible/one/files/master.gitconfig"
dest="~/new1.gitconfig"
Now let's try to run the playbook.
ansible-playbook playbooks/sample-check-git.yml
