Convert variable to bool in group_by

We use the group_by module to create groups based on host variables.
When the variable is a boolean, we should convert it to a bool using the
bool filter, to ensure that the group name has a consistent format.
This commit is contained in:
Mark Goddard 2017-11-24 15:34:01 +00:00
parent c57faedcd8
commit 7f767b1b4e
6 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@
tasks:
- name: Create controllers group with ironic enabled
group_by:
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic }}"
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic | bool }}"
- name: Ensure locally built Ironic Python Agent images are copied
hosts: controllers_with_ironic_enabled_True

View File

@ -13,7 +13,7 @@
tasks:
- name: Create controllers group with ironic enabled
group_by:
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic }}"
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic | bool }}"
- name: Group controller hosts in systems requiring the workaround
hosts: controllers_with_ironic_enabled_True

View File

@ -4,7 +4,7 @@
tasks:
- name: Create controllers group with ironic enabled
group_by:
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic }}"
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic | bool }}"
- name: Ensure introspection rules are registered in Ironic Inspector
# Only required to run on a single host.

View File

@ -9,7 +9,7 @@
tasks:
- name: Create controllers group with ironic enabled
group_by:
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic }}"
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic | bool }}"
- name: Ensure Ironic Python Agent images are built and installed
hosts: controllers_with_ironic_enabled_True[0]

View File

@ -4,7 +4,7 @@
tasks:
- name: Create controllers group with ironic enabled
group_by:
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic }}"
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic | bool }}"
- name: Ensure Ironic Python Agent (IPA) images are downloaded and registered
hosts: controllers_with_ironic_enabled_True[0]

View File

@ -4,7 +4,7 @@
tasks:
- name: Create controllers group with ironic enabled
group_by:
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic }}"
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic | bool }}"
- name: Ensure provisioning network and subnet are registered in neutron
# Only required to run on a single host.