We have already nice preconfigured nagios with hosts, host groups etc... Is it possible to get host groups from nagios to ansible? are there some plug-in/module which may allow us to do:
ansible -m ping hostgroup-from-nagios-config-files
We have already nice preconfigured nagios with hosts, host groups etc... Is it possible to get host groups from nagios to ansible? are there some plug-in/module which may allow us to do:
ansible -m ping hostgroup-from-nagios-config-files
Take a look at the ansible documentation regarding dynamic inventories.
The actual implementation is, of course, up to you. There have been attempts at implementing something similar.
Not exactly what you're asking for, but an approach that worked for me was to use ansible host groups to generate nagios host groups. For my team ansible is our source of truth as to what should be running where, so didn't want to have that repeated anywhere else (like in nagios). More details could be found here.