Hi all, i don’t know if this is really possibile or i can use tower/awx for this.
Anyway, i’d like to setup a trigger on my monitoring system that, if the trigger is fired on a particular host, launches a template/job/playbook on that host.
For example, a trigger for “low disk space” is fired for host myhost.local on my monitoring software.
The trigger generates an action that will call via REST API a template on my tower server, ie. a POST to http://tower.local/job_templates/13/launch/ .
Now, the job will be lauched for the inventory associated to htat template but i’d like the job to be run only on myhost.local.
I know i can pass an inventory id via REST API but really id’ like to pass only a host .
How can i do that? Does it make sense?
Do i have to: create an inventory containing myhost.local → get that inventory id → pass the inventory id via POST when launching template → delete the inventory ?
Hello aquilinux. Was wondering if you knew what I might be doing wrong or what might have changed. When using your example I get the below errors. Thanks for your time.
`
[WARNING]: provided hosts list is empty, only localhost is available. Note
3 that the implicit localhost does not match ‘all’
4
5 [WARNING]: Could not match supplied host pattern, ignoring: