Ansible inventory from Check_Mk

Assuming you have an “automation” user setup on your cmk and secret, something like this could work:

curl -s "https://your-ssl-hostname.example.com/monitor/check_mk/webapi.py?action
=get_all_hosts&_username=automation&_secret=my-very-long-secret&request_format=pytho
n&output_format=json" 

And again, you can pretty print that to easily see how that looks by piping through python -mjson.tool