Feature Requests
Completed :latest

Ansible Dynamic Inventory

I've registered all of my hosts into PatchMon, and assigned them into groups.

It'd be amazing if I could point Ansible at a dynamic inventory plugin that queries patchmon for a list of hosts (and their groups)

https://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html

Is this something you'd be willing to support? I'm happy contributing to this feature/new repo if accepted?

4 Comments

Posting anonymously

slibonati·9 months ago

Posting anonymously

slibonati·9 months ago

I think this is in large part there already. There is an endpoint , /api/v1/hosts/info which returns host info. Probably need to add in host group info which this endpoint currently does not return. I'm going to take a stab at writing the plugin.

Posting anonymously

9technologygroup·10 months ago

I'm going to further research into this.

If anyone else has view on this feature request then do put them forth :)

Posting anonymously

aukef·10 months ago

This is an interesting idea! I would probably use this. Perhaps this could be handled outside of PatchMon though: if there is an API to retrieve all hosts and their groups from PatchMon, one could create a simple script to turn this into the correct syntax for an Ansible inventory

Posting anonymously