d3d67dc02c
It will check the setting of neutron_plugin_agent, if it is set to "ovn" or "openvswitch", and run container and volume checks to make sure the other agent was not already deployed. Change-Id: Ie00572f3ff9d3500abd5519bd472e2134c318886
36 lines
1.3 KiB
YAML
36 lines
1.3 KiB
YAML
---
|
|
- name: Get container facts
|
|
become: true
|
|
kolla_container_facts:
|
|
container_engine: "{{ kolla_container_engine }}"
|
|
name:
|
|
- neutron_openvswitch_agent
|
|
- ovn_controller
|
|
check_mode: false
|
|
register: container_facts
|
|
|
|
- name: Get container volume facts
|
|
become: true
|
|
kolla_container_volume_facts:
|
|
container_engine: "{{ kolla_container_engine }}"
|
|
name:
|
|
- ovn_nb_db
|
|
- ovn_sb_db
|
|
check_mode: false
|
|
register: container_volume_facts
|
|
|
|
- name: Check for ML2/OVN presence
|
|
assert:
|
|
that: neutron_plugin_agent == 'ovn'
|
|
fail_msg: "ML2/OVN agent detected, neutron_plugin_agent is not set to 'ovn', Kolla-Ansible does not support this migration operation."
|
|
when: (container_facts['ovn_controller'] is defined) or (container_volume_facts['ovn_nb_db'] is defined) or (container_volume_facts['ovn_sb_db'] is defined)
|
|
|
|
- name: Check for ML2/OVS presence
|
|
assert:
|
|
that:
|
|
- neutron_plugin_agent == 'openvswitch'
|
|
- container_volume_facts['ovn_nb_db'] is not defined
|
|
- container_volume_facts['ovn_sb_db'] is not defined
|
|
fail_msg: "ML2/OVS agent detected, neutron_plugin_agent is not set to 'openvswitch', Kolla-Ansible does not support this migration operation."
|
|
when: container_facts['neutron_openvswitch_agent'] is defined
|