Callback Provisioning with Ansible Tower

One big advantage to Tower is the REST API. This means hosts can do an API call to Tower and have Tower run a playbook against your host. One way I use it is we create a systemd timer and service in the post install section of the kickstart config. After a system reboots it waits for a predetermined time and does an API call to run the provisioning playbook to make sure the system is in compliance. This can be done at predetermined intervals also, like every 15 minutes.

To enable this all you have to do is enable callback provisioning in your job template:

It gives you the URL and the key. Tower ships with a script for the API call, but you can just use curl also. Here's an example: