Define venv_tag as separate task for distro
We do define venv_tag locally using python_venv_build role so no need to do the same as a separate task for source installs. Though this task is still needed for distro path. Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/862924 Needed-By: https://review.opendev.org/c/openstack/openstack-ansible/+/866126 Change-Id: I49a45e68bd6030d4bd0667c8384a01088819f260
This commit is contained in:

committed by
Dmitriy Rabotyagov

parent
1add87ad2f
commit
8017d4dd84
@@ -59,6 +59,7 @@
|
|||||||
delay: 2
|
delay: 2
|
||||||
notify:
|
notify:
|
||||||
- Restart web server
|
- Restart web server
|
||||||
|
- Restart uWSGI
|
||||||
|
|
||||||
- name: Install/remove apache mod packages for federated authentication
|
- name: Install/remove apache mod packages for federated authentication
|
||||||
package:
|
package:
|
||||||
@@ -92,41 +93,47 @@
|
|||||||
- section: "keystone"
|
- section: "keystone"
|
||||||
option: "venv_tag"
|
option: "venv_tag"
|
||||||
value: "{{ keystone_venv_tag }}"
|
value: "{{ keystone_venv_tag }}"
|
||||||
|
- section: "keystone"
|
||||||
|
option: "install_method"
|
||||||
|
value: "{{ keystone_install_method }}"
|
||||||
when: keystone_install_method == 'source'
|
when: keystone_install_method == 'source'
|
||||||
|
|
||||||
# TODO(hwoarang): We need to have a venv_tag local fact deployed since we use it in the
|
# TODO(hwoarang): We need to have a venv_tag local fact deployed since we use it in the
|
||||||
# integration repo to determine if keystone software is the same across all nodes in the
|
# integration repo to determine if keystone software is the same across all nodes in the
|
||||||
# keystone_all group so we can safely run the DB migration. See
|
# keystone_all group so we can safely run the DB migration. See
|
||||||
# https://github.com/openstack/openstack-ansible/blob/master/playbooks/os-keystone-install.yml
|
# https://github.com/openstack/openstack-ansible/blob/master/playbooks/os-keystone-install.yml
|
||||||
- name: Record the venv tag deployed
|
- name: Record local facts for distro path
|
||||||
ini_file:
|
when: keystone_install_method == 'distro'
|
||||||
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
block:
|
||||||
section: keystone
|
- name: Record the osa version deployed
|
||||||
option: venv_tag
|
ini_file:
|
||||||
value: "{{ keystone_venv_tag }}"
|
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
||||||
|
section: keystone
|
||||||
|
option: venv_tag
|
||||||
|
value: "{{ keystone_venv_tag }}"
|
||||||
|
|
||||||
- name: Initialise the upgrade facts
|
- name: Initialise the upgrade facts
|
||||||
ini_file:
|
ini_file:
|
||||||
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
||||||
section: keystone
|
section: keystone
|
||||||
option: "{{ item.name }}"
|
option: "{{ item.name }}"
|
||||||
value: "{{ item.state }}"
|
value: "{{ item.state }}"
|
||||||
with_items:
|
with_items:
|
||||||
- name: "need_db_expand"
|
- name: "need_db_expand"
|
||||||
state: "True"
|
state: "True"
|
||||||
- name: "need_db_migrate"
|
- name: "need_db_migrate"
|
||||||
state: "True"
|
state: "True"
|
||||||
- name: "need_db_contract"
|
- name: "need_db_contract"
|
||||||
state: "True"
|
state: "True"
|
||||||
- name: "install_method"
|
- name: "install_method"
|
||||||
state: "{{ keystone_install_method }}"
|
state: "{{ keystone_install_method }}"
|
||||||
when: (install_packages is changed) or
|
when: (install_packages is changed) or
|
||||||
(ansible_local is not defined) or
|
(ansible_local is not defined) or
|
||||||
('openstack_ansible' not in ansible_local) or
|
('openstack_ansible' not in ansible_local) or
|
||||||
('keystone' not in ansible_local['openstack_ansible']) or
|
('keystone' not in ansible_local['openstack_ansible']) or
|
||||||
('need_db_expand' not in ansible_local['openstack_ansible']['keystone']) or
|
('need_db_expand' not in ansible_local['openstack_ansible']['keystone']) or
|
||||||
('need_db_migrate' not in ansible_local['openstack_ansible']['keystone']) or
|
('need_db_migrate' not in ansible_local['openstack_ansible']['keystone']) or
|
||||||
('need_db_contract' not in ansible_local['openstack_ansible']['keystone'])
|
('need_db_contract' not in ansible_local['openstack_ansible']['keystone'])
|
||||||
|
|
||||||
- name: Create WSGI symlinks
|
- name: Create WSGI symlinks
|
||||||
file:
|
file:
|
||||||
|
Reference in New Issue
Block a user