Skip to content

Commit

Permalink
Fix use of tags with overcloud post configure
Browse files Browse the repository at this point in the history
When specifying tags with 'kayobe overcloud post configure --tags <tags>', the
expected plays typically do not run. This seems to be due to an ansible bug,
where if a dynamically created group is referenced before creation, it will
remain empty. See ansible/ansible#20360.

This change works around this issue by modifying the name of the dynamic groups
used in the post configure playbooks to be unique to each playbook.

Fixes: #138
  • Loading branch information
markgoddard committed Mar 5, 2018
1 parent 435298b commit 77a41a9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
tasks:
- name: Create controllers group with ironic enabled
group_by:
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic | bool }}"
key: "controllers_for_introspection_rules_dell_lldp_workaround_{{ kolla_enable_ironic | bool }}"

- name: Group controller hosts in systems requiring the workaround
hosts: controllers_with_ironic_enabled_True
hosts: controllers_for_introspection_rules_dell_lldp_workaround_True
gather_facts: False
tags:
- introspection-rules
Expand Down
4 changes: 2 additions & 2 deletions ansible/overcloud-introspection-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
tasks:
- name: Create controllers group with ironic enabled
group_by:
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic | bool }}"
key: "controllers_for_introspection_rules_{{ kolla_enable_ironic | bool }}"

- name: Ensure introspection rules are registered in Ironic Inspector
# Only required to run on a single host.
hosts: controllers_with_ironic_enabled_True[0]
hosts: controllers_for_introspection_rules_True[0]
gather_facts: False
tags:
- introspection-rules
Expand Down
4 changes: 2 additions & 2 deletions ansible/overcloud-ipa-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
tasks:
- name: Create controllers group with ironic enabled
group_by:
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic | bool }}"
key: "controllers_for_ipa_build_{{ kolla_enable_ironic | bool }}"

- name: Ensure Ironic Python Agent images are built and installed
hosts: controllers_with_ironic_enabled_True[0]
hosts: controllers_for_ipa_build_True[0]
gather_facts: False
tags:
- ipa-build
Expand Down
4 changes: 2 additions & 2 deletions ansible/overcloud-ipa-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
tasks:
- name: Create controllers group with ironic enabled
group_by:
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic | bool }}"
key: "controllers_for_ipa_images_{{ kolla_enable_ironic | bool }}"

- name: Ensure Ironic Python Agent (IPA) images are downloaded and registered
hosts: controllers_with_ironic_enabled_True[0]
hosts: controllers_for_ipa_images_True[0]
gather_facts: False
tags:
- ipa-images
Expand Down
4 changes: 2 additions & 2 deletions ansible/provision-net.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
tasks:
- name: Create controllers group with ironic enabled
group_by:
key: "controllers_with_ironic_enabled_{{ kolla_enable_ironic | bool }}"
key: "controllers_for_provision_net_{{ kolla_enable_ironic | bool }}"

- name: Ensure provisioning network and subnet are registered in neutron
# Only required to run on a single host.
hosts: controllers_with_ironic_enabled_True[0]
hosts: controllers_for_provision_net_True[0]
gather_facts: False
tags:
- provision-net
Expand Down

0 comments on commit 77a41a9

Please sign in to comment.