kayobe/ansible/inventory/hosts
Mark Goddard 73df27677c Use environment variables for plugin paths
Kayobe provides various roles and plugins in the ansible directory.
These are accessible to Kayobe playbooks in the same directory.

In some cases it can be useful to use these items from Kayobe custom
playbooks, however they cannot since they reside in a different
directory. Typically we work around this by symlinking to the relevant
directory from the directory containing the custom playbook. This is not
an elegant workaround, and has assumptions about the relative paths of
the Kayobe configuration and virtual environment in which Kayobe is
installed.

This change adds the Kayobe role, collection, and plugin paths to the
relevant Ansible lookup paths using environment variables. This allows
custom playbooks to use these items. Also added to the lookup paths are
roles, collections and plugins in Kayobe configuration in the
etc/kayobe/ansible/ directory. This removes the limitation of playbooks
needing to reside in the same directory as those items in order to use
them.

We import the Ansible configuration settings module directly, since it
avoids replicating the configuration logic.

Story: 2010280
Task: 46234

Change-Id: I2fb2b4d7ed937e0184a62b0f119659569448f8df
2022-12-14 22:52:41 +01:00

2 lines
77 B
INI

# Dummy inventory file to allow Ansible to consume this inventory directory.