Thanks to visit codestin.com
Credit goes to github.com

Skip to content

RFE: Shared inventory directory #4002

@cidrblock

Description

@cidrblock

As a user I want to specify the parent inventory directory for a scenario.

Molecule allows for this currently:

    provisioner:
      name: ansible
      inventory:
        links:
          hosts: ../../../inventory/hosts
          group_vars: ../../../inventory/group_vars/
          host_vars: ../../../inventory/host_vars/

it also sets MOLECULE_INVENTORY_FILE

Use cases:

  • Allow the user to specify a list of inventory locations that will override current molecule invetory logic and be apssed to the ansible-playbook command.
  • When using ansible as the provisioner, the invetory is constructed and would otherwise be put in the scneario specific inventory directory. This would allow for the sharing of an inventory between scenarios
  • Current use of seperate keywords (hosts/group_vars/host_vars) is confusing as ansible will resolve everything within an inventory directory if passed with -i

Related: #4000 would allow for a location to store a shared inventory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions