You need something that will do basically CI/CD. There are few options (in no particular order):
Gitlab + autodeploy (or custom deployment)
skaffold + git-sync + kaniko
There are more, but basically, you need a component to watch for changes, something that knows how to build an image, and something else that can deploy it (some of these might be done by ...
Get the latest version of Tomcat:
$ curl -s 'https://api.github.com/repos/apache/tomcat/tags?per_page=1' | jq -r ..name
Get the latest version of Tomcat 9:
$ curl -s 'https://api.github.com/repos/apache/tomcat/tags?per_page=100' | jq -r '. | .name' | sort -V | grep ^9 | tail -n 1
Get the latest version of Tomcat 8.5:
$ curl -s 'https://...
Use the --limit option to select a subset of hosts:
ansible-playbook -i /path test.yml --tags automation --limit host2
Its description from ansible-playbook documentation:
further limit selected hosts to an additional pattern