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
local.yml. We can also give a filename to override this behavior.
$ ansible-pull -U https://github.com/training-devops/ansible-pull-example -i <path_to_inventory>
We should put the command above in cron to execute this periodically.