Merge "Only run OpenStack tasks once"

This commit is contained in:
Zuul 2018-09-29 23:16:21 +00:00 committed by Gerrit Code Review
commit 4bbc849c14
3 changed files with 5 additions and 3 deletions

View File

@ -60,7 +60,6 @@
- octavia-install
- include_tasks: octavia_mgmt_network.yml
run_once: true
when:
- octavia_neutron_management_network_uuid is not defined
- octavia_neutron_management_network_name is defined
@ -74,7 +73,6 @@
- octavia-install
- include_tasks: octavia_flavor_create.yml
run_once: true
when:
- octavia_nova_flavor_uuid is not defined
tags:

View File

@ -25,6 +25,7 @@
{{ (octavia_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable']) }}
block:
- name: Create Octavia Flavor
run_once: true
os_nova_flavor:
auth:
auth_url: "{{ keystone_service_adminurl }}"
@ -34,7 +35,7 @@
user_domain_name: "{{ octavia_service_user_domain_id }}"
project_domain_name: "{{ octavia_service_project_domain_id }}"
state: present
name: "{{ octavia_amp_flavor_name}}"
name: "{{ octavia_amp_flavor_name }}"
ram: "{{ octavia_amp_ram }}"
vcpus: "{{ octavia_amp_vcpu }}"
disk: "{{ octavia_amp_disk }}"

View File

@ -25,6 +25,7 @@
{{ (octavia_service_setup_host == 'localhost') | ternary(ansible_playbook_python, ansible_python['executable']) }}
block:
- name: Create mgmt network
run_once: true
os_network:
auth:
auth_url: "{{ keystone_service_adminurl }}"
@ -49,6 +50,7 @@
- octavia_service_net_setup | bool
- name: Ensure mgmt subnet exists
run_once: true
os_subnet:
auth:
auth_url: "{{ keystone_service_adminurl }}"
@ -75,6 +77,7 @@
- octavia_service_net_setup | bool
- name: Get neutron network
run_once: true
os_networks_facts:
cloud: default
region_name: "{{ octavia_service_region }}"