Uploaded image for project: 'Ansible Automation Platform RFEs'
  1. Ansible Automation Platform RFEs
  2. AAPRFE-2601

Inventory Export - Add Option to Optimize for Dynamic Inventories (ignore hosts/groups)

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 2.6
    • content
    • False
    • Hide

      None

      Show
      None
    • False

      By default, if you use the export module, then all child entities (hosts and groups) will also be exported. Since these inventories are dynamic and can be re-populated based on the inventory source configuration, the additional child configurations provide no value. For large inventories, this default behavior can add significant time to the export and downstream import process.

      The proposed solution would provide a flag for users to indicate they do not want to export hosts/groups associated to a set of dynamic inventories. Ideally dynamic inventories could be "auto-detected", but an additional parameter representing a list of dynamic inventories to which the flag applies would be sufficient.

      Current experience

      Currently, there is no support for ignoring the hosts/groups associated with a dynamic inventory.

      Suggested experience

      Users of the export module would have the option to specify a behavior which ignores the hosts/groups associated with a specified list of dynamic inventories to optimize their import/export processes.

      Steps to Understand the Value Prop

      • Have a Controller instance with at least one Dynamic Inventory which has synced from its source (resulting in an arbitrary, non-zero number of hosts/groups)
      • Implement an export process using the collection module (awx.awx.export)
      • Set the proposed "flag" to true and provide list of dynamic inventories
      • Observe that the Inventory and relevant Inventory Sources are exported, not the hosts/groups.
      • Observe that, in the absence of the flag (or false), the export behavior does not regress and exports all related hosts/groups as it would have previously

      Additional information

      I implemented a simplified workaround with a customer by modifying the export module and documented that experiment here:
      https://autodotes.com/posts/c3w8Mn7Kpa1ImLlLfJQy

              dmendoza@redhat.com Dafne Mendoza
              zleblanc@redhat.com Zachary LeBlanc
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: