Ansible Pull Mode

Traditionally Ansible is run in "push" mode where Ansible playbooks are run from a well known machine or from local machine and this, in turn, makes changes on remote machines as per the inventory.

However, Ansible also has a "pull" mode where remote machines would locally pull Ansible code from a git repository and execute <fqdn.yml> or local.yml. We can also give a filename to override this behavior.

$ ansible-pull -U -i <path_to_inventory>

We should put the command above in cron to execute this periodically.