Hello,
I’m trying to the Ansible nagios module to schedule downtime. In the documentation it says for ‘host’ to use ‘{{ inventor_hostname }}’. I’m assuming this is an internal variable that gets the host name from the inventory file. This is not working. Not only that but we only have one nagios server, which is where the commands apparently need to be executed in order to schedule the downtime.
So, my question is: how do you setup the playbook to execute on the nagios server but use the hosts listed in the inventory file to schedule the downtime? As of right now the only way I’ve been able to do this is to create an extra-vars files and populate that with the hosts names, but this becomes cumbersome.
Any thoughts?
Thank you,