I use ansible-pull regularly, and I use 5-minute intervals to check. This is inefficient 99% of the time, where I haven’t committed anything, and slow when i do commit and wait for a deployment. It would be far easier if ansible could listen to a webhook from Github/Bitbucket and deploy when that triggered.
To that end, I would like to add a --daemon option to ansible-pull. It would work like so:
ansible-pull --daemon
or
ansible-pull --daemon=http://://
It would launch a daemon listening on a specific port and endpoint, and run the playbook whenever it triggered (with some sort of cooldown delay).
What do you think? I can develop this soon and send you a PR if it’s agreeable.