diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..dcb3840 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,3 @@ +[defaults] + +inventory_plugins = ./plugins/inventory \ No newline at end of file diff --git a/inventory.yml b/inventory.yml index 4d6c2fc..304e6aa 100644 --- a/inventory.yml +++ b/inventory.yml @@ -1,7 +1 @@ -plugin: netbox.netbox.nb_inventory -api_endpoint: https://demo.netbox.dev -token: da482f8ca0d65ebc3b97aba4a2b5cc66e31f8a7f -plurals: no -group_by: - - device_type - +plugin: td_assetmgmt diff --git a/plugins/inventory/td_assetmgmt.py b/plugins/inventory/td_assetmgmt.py new file mode 100644 index 0000000..5d85e1d --- /dev/null +++ b/plugins/inventory/td_assetmgmt.py @@ -0,0 +1,11 @@ +from ansible.plugins.inventory import BaseFileInventoryPlugin + +class InventoryModule(BaseFileInventoryPlugin): + + NAME = 'td_assetmgmt' + + def parse(self, inventory, loader, path, cache=True): + + super(InventoryModule, self).parse(inventory, loader, path, cache) + + self.inventory.add_host('boi') \ No newline at end of file