From 7f767b1b4e933719ce53f2e35225fc8bbe04468d Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Fri, 24 Nov 2017 15:34:01 +0000 Subject: [PATCH] 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. --- ansible/kolla-openstack.yml | 2 +- ansible/overcloud-introspection-rules-dell-lldp-workaround.yml | 2 +- ansible/overcloud-introspection-rules.yml | 2 +- ansible/overcloud-ipa-build.yml | 2 +- ansible/overcloud-ipa-images.yml | 2 +- ansible/provision-net.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible/kolla-openstack.yml b/ansible/kolla-openstack.yml index 1250f818f..a0ad4c331 100644 --- a/ansible/kolla-openstack.yml +++ b/ansible/kolla-openstack.yml @@ -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 diff --git a/ansible/overcloud-introspection-rules-dell-lldp-workaround.yml b/ansible/overcloud-introspection-rules-dell-lldp-workaround.yml index ac44d5010..8244cc2ba 100644 --- a/ansible/overcloud-introspection-rules-dell-lldp-workaround.yml +++ b/ansible/overcloud-introspection-rules-dell-lldp-workaround.yml @@ -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 diff --git a/ansible/overcloud-introspection-rules.yml b/ansible/overcloud-introspection-rules.yml index 502373e15..669d08a10 100644 --- a/ansible/overcloud-introspection-rules.yml +++ b/ansible/overcloud-introspection-rules.yml @@ -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. diff --git a/ansible/overcloud-ipa-build.yml b/ansible/overcloud-ipa-build.yml index 587a8b46e..7c8ea7750 100644 --- a/ansible/overcloud-ipa-build.yml +++ b/ansible/overcloud-ipa-build.yml @@ -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] diff --git a/ansible/overcloud-ipa-images.yml b/ansible/overcloud-ipa-images.yml index 488ea66c7..a37458128 100644 --- a/ansible/overcloud-ipa-images.yml +++ b/ansible/overcloud-ipa-images.yml @@ -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] diff --git a/ansible/provision-net.yml b/ansible/provision-net.yml index 7fe844217..dccf2c990 100644 --- a/ansible/provision-net.yml +++ b/ansible/provision-net.yml @@ -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.