openstack-ansible/doc/source/contributor/inventory-and-vars.rst
Jesse Pretorius 315780f350 March to the beat of the new docs drum
Boss drum, motivating rhythm of life with the
healing, rhythmic synergy.

More seriously, this patch re-arranges the
documentation structure to conform to the
structure outlined in [1].

With it, some changes are made to effectively
transition the links and simplify the sphinx
configuration.

The Mitaka/Liberty documentation links are
removed as they are no longer available.

[1] http://specs.openstack.org/openstack/docs-specs/specs/pike/os-manuals-migration.html
Change-Id: Icc985de3af4de5ea7a5aa01b6e6f6e524c67f11b
2017-07-05 09:13:13 +00:00

1.5 KiB

Inventory and variables

Our dynamic Inventory

OpenStack-Ansible ships with its own dynamic inventory. You can find more explanations on the inventory.

Variable precedence

Role defaults

Every role has a file, defaults/main.yml which holds the usual variables overridable by a deployer, like a regular Ansible role. This defaults are the closest possible to OpenStack standards.

Group vars and host vars

OpenStack-Ansible provides safe defaults for deployers in its group_vars folder. They take care of the wiring between different roles, like for example storing information on how to reach RabbitMQ from nova role.

You can override the existing group vars (and host vars) by creating your own folder in /etc/openstack_deploy/group_vars (and /etc/openstack_deploy/host_vars respectively).

If you want to change the location of the override folder, you can adapt your openstack-ansible.rc file, or export GROUP_VARS_PATH and HOST_VARS_PATH during your shell session.

Role vars

Because OpenStack-Ansible is following Ansible precedence, every role vars/ will take precedence over group vars. This is intentional. You should avoid overriding these variables.

User variables

If you want to override a playbook or a role variable, you can define the variable you want to override in a /etc/openstack_deploy/user_*.yml file.