bifrost/releasenotes/notes/support-custom-ansible-groups-38ad5d3a930b17eb.yaml
Markos Chandras 0233a0e963 inventory: Add support for defining custom host groups
Add new 'host_groups' property in inventory files to add hosts to
additional Ansible groups. Moreover, add new DEFAULT_HOST_GROUPS env
variable which can be used to override the default 'baremetal' group.
Finally, add two new variables 'test_vm_default_groups' and
'test_vm_groups' to allow users to set per-vm and default inventory
groups when provisioning virtual machines.

Change-Id: Id82e63e7049072437a5a8ad5c0300fb29f75ae1f
2017-05-02 23:14:52 +01:00

42 lines
1.4 KiB
YAML

---
features:
- |
It is now possible to define additional per-host inventory
groups for all the hosts that make use of the dynamic JSON
inventory. The way to do that is to simply define a
list of groups in the `host_group` property as illustrated
in the following example::
.. code-block:: yaml
"node1": {
"uuid": "a8cb6624-0d9f-c882-affc-046ebb96ec01",
"host_groups": [
"baremetal"
],
}
When provisioning virtual machines it's possible to set
the per-VM inventory groups by setting the ``test_vm_host_groups``
variable as follows::
``{ test_vm_host_groups: { testhost: [nova, cinder] } }``
It is also possible to change the default ``baremetal`` group
for virtual machines by simply setting the ``host_default_group``
variable to a list of default groups as follows::
``{ test_vm_default_groups: [baremetal vms] }``
The list of default groups can also be set in the
``DEFAULT_HOST_GROUPS`` environmental variable. This is currently
the only way to change the default group for baremetal hosts.
``export DEFAULT_HOST_GROUPS="foo bar zoo"``
This will change the default groups to [foo, bar, zoo] instead of
the currently [baremetal] default. Extra care should be taken when
using this method since most bifrost playbooks depend on having a
[baremetal] group available for provisioning hosts.