Allow users to skip services to cut down on conflicts

We have received complaints that the openstack-service-setup.yml
playbooks will try to overwrite flavors and images of the same
name that may have different attributes.  This is due to them
requiring some unique configurations that just so happen to
have been using the same name in tests.  The tag additions
will allow them to work around this by skipping the ones
conflicting with existing entries.

Change-Id: I3eef87f522a219d094181fa64933f86142b060ef
Closes-Bug: 1760219
This commit is contained in:
Shannon Mitchell 2018-03-30 16:10:11 -05:00 committed by Jean-Philippe Evrard
parent 1021a5b945
commit d29019d448

View File

@ -34,6 +34,8 @@
swap: "{{ item.swap }}" swap: "{{ item.swap }}"
ephemeral: "{{ item.ephemeral }}" ephemeral: "{{ item.ephemeral }}"
with_items: "{{ vm_flavors }}" with_items: "{{ vm_flavors }}"
tags:
- create_flavors
- name: Create networks - name: Create networks
os_network: os_network:
@ -46,6 +48,8 @@
provider_network_type: "{{ item.network_type }}" provider_network_type: "{{ item.network_type }}"
provider_physical_network: "{{ item.physical_network | default ('') }}" provider_physical_network: "{{ item.physical_network | default ('') }}"
with_items: "{{ networks }}" with_items: "{{ networks }}"
tags:
- create_networks
- name: Create subnets on networks - name: Create subnets on networks
os_subnet: os_subnet:
@ -62,6 +66,8 @@
allocation_pool_end: "{{ item.allocation_pool_end }}" allocation_pool_end: "{{ item.allocation_pool_end }}"
dns_nameservers: "{{ item.dns_nameservers | default([]) }}" dns_nameservers: "{{ item.dns_nameservers | default([]) }}"
with_items: "{{ subnets }}" with_items: "{{ subnets }}"
tags:
- create_networks
- name: Create a router on both public and private networks - name: Create a router on both public and private networks
os_router: os_router:
@ -74,6 +80,8 @@
- "{{ private_subnet_name }}" - "{{ private_subnet_name }}"
ignore_errors: yes # will report error if this router already exists ignore_errors: yes # will report error if this router already exists
register: router_details register: router_details
tags:
- create_networks
- name: Get list of security groups - name: Get list of security groups
# Must use shell here because Ansible does not have os_security_group_facts module # Must use shell here because Ansible does not have os_security_group_facts module
@ -81,6 +89,8 @@
args: args:
executable: /bin/bash executable: /bin/bash
register: sec_groups register: sec_groups
tags:
- create_networks
- name: Setup rules on all security groups - name: Setup rules on all security groups
os_security_group_rule: os_security_group_rule:
@ -94,8 +104,12 @@
with_nested: with_nested:
- "{{ security_group_rules }}" - "{{ security_group_rules }}"
- "{{ sec_groups.stdout_lines }}" - "{{ sec_groups.stdout_lines }}"
tags:
- create_networks
# Install some Linux system images # Install some Linux system images
- include: ./openstack-image-setup.yml - include: ./openstack-image-setup.yml
with_items: "{{ images }}" with_items: "{{ images }}"
tags:
- create_images