openstack-ansible/doc/source/reference/inventory/configure-inventory.rst
Jean-Philippe Evrard 6ed93f37d3 [Docs] Simplify advanced config
This merges advanced configuration and inventory, from the
operations guide into the reference guide. This avoids
duplications of the documentation accross the guides.

Change-Id: I6fd758b89a84698b0ac8e227d97cb24914bc2066
(cherry picked from commit 6435ec7521)
2018-03-15 16:35:41 +00:00

2.0 KiB

Configuring the inventory

conf.d

Common OpenStack services and their configuration are defined by OpenStack-Ansible in the /etc/openstack_deploy/openstack_user_config.yml settings file.

Additional services should be defined with a YAML file in /etc/openstack_deploy/conf.d, in order to manage file size.

env.d

The /etc/openstack_deploy/env.d directory sources all YAML files into the deployed environment, allowing a deployer to define additional group mappings.

This directory is used to extend the environment skeleton, or modify the defaults defined in the inventory/env.d directory.

Configuration constraints

Group memberships

When adding groups, keep the following in mind:

  • A group can contain hosts
  • A group can contain child groups

However, groups cannot contain child groups and hosts.

The lxc_hosts Group

When the dynamic inventory script creates a container name, the host on which the container resides is added to the lxc_hosts inventory group.

Using this name for a group in the configuration will result in a runtime error.

Checking inventory configuration for errors

Using the --check flag when running dynamic_inventory.py will run the inventory build process and look for known errors, but not write any files to disk.

If any groups defined in the openstack_user_config.yml or conf.d files are not found in the environment, a warning will be raised.

This check does not do YAML syntax validation, though it will fail if there are unparseable errors.

Writing debug logs

The --debug/-d parameter allows writing of a detailed log file for debugging the inventory script's behavior. The output is written to inventory.log in the current working directory.

The inventory.log file is appended to, not overwritten.

Like --check, this flag is not invoked when running from ansible.