Browse Source

Merge "migration: Use python3 packages when needed"

changes/02/675702/2
Zuul 3 years ago committed by Gerrit Code Review
parent
commit
38874d8ebc
  1. 16
      migration/infrared/tripleo-ovn-migration/main.yml
  2. 8
      migration/migrate-to-ovn.yml

16
migration/infrared/tripleo-ovn-migration/main.yml

@ -2,16 +2,24 @@
- name: Install migration tool
hosts: undercloud
become: true
vars:
python_major_version: "{{ ansible_facts.python_version.split('.')[0] }}"
tasks:
- name: Install python virtualenv
- name: Install python 2 virtualenv and networking ovn migration tool
yum:
name: python-virtualenv
name:
- python-virtualenv
- python-networking-ovn-migration-tool
state: present
when: python_major_version | int == 2
- name: Install python networking ovn migration tool
- name: Install python 3 virtualenv and networking ovn migration tool
yum:
name: python-networking-ovn-migration-tool
name:
- python3-virtualenv
- python3-networking-ovn-migration-tool
state: present
when: python_major_version | int == 3
- name: Set host_key_checking to False in ansible.cfg
ini_file:

8
migration/migrate-to-ovn.yml

@ -94,10 +94,16 @@
command: "ovn-sbctl set-connection ptcp:6642:{{ ovn_db_ip }}"
when: ovn_central is defined
changed_when: False
- name: Ensure the Neutron ML2 plugin is installed on neutron-api hosts.
- name: Ensure the Neutron ML2 plugin Python 2 is installed on neutron-api hosts.
yum:
name: python-networking-ovn
state: present
when: ansible_facts.python_version.split('.')[0] | int == 2
- name: Ensure the Neutron ML2 plugin Python 3 is installed on neutron-api hosts.
yum:
name: python-networking-ovn
state: present
when: ansible_facts.python_version.split('.')[0] | int == 3
- name: Update Neutron configuration files
ini_file: dest={{ item.dest }} section={{ item.section }} option={{ item.option }} value={{ item.value }}
with_items:

Loading…
Cancel
Save