InventoryManager loader

8 views
Skip to first unread message

Mandy Liu

unread,
Aug 31, 2021, 6:30:02 AMAug 31
to Ansible Development
Hi everyone,

I'm currently tinkering around the source code of the InventoryManager of Ansible and am currently stuck on how it normally picks up the loader and sources?
I'm trying to inherit attributes from the InventoryManager (with super.__init__()), but I need a loader to do so and DataLoader() doesn't seem to give me the right sources / doesn't parse the inventory correctly (or maybe it's something else, but I really don't know what). 

class InventoryManager(object):
    ''' Creates and manages inventory '''

    def __init__(self, loader, sources=None, parse=True):

        # base objects
        self._loader = loader
        self._inventory = InventoryData()

Appreciate any help :)
Reply all
Reply to author
Forward
0 new messages