InventoryManager loader

10 vues
Accéder directement au premier message non lu

Mandy Liu

non lue,
31 août 2021, 06:30:0231/08/2021
à 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 :)
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message