377588a57c
The variables nova_developer_mode and nova_venv_download no longer carry any meaning. This review changes nova to do the equivalent of what developer_mode was all the time, meaning that it always builds the venv and never requires the repo server, but it will use a repo server when available. We also change include_tasks to import_tasks and include_role to import_role so that the tags in the python_venv_build role will work. Change-Id: I1a1ac5948f3bd647eb0ee5e10e9e7ae06b740bb7
99 lines
3.4 KiB
YAML
99 lines
3.4 KiB
YAML
---
|
|
# Copyright 2014, Rackspace US, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
- name: Setup powervm repository
|
|
include_tasks: nova_install_apt_powervm.yml
|
|
when:
|
|
- "nova_services['nova-compute']['group'] in group_names"
|
|
- "nova_virt_type == 'powervm'"
|
|
- "ansible_pkg_mgr == 'apt'"
|
|
|
|
- name: Record the installation method
|
|
ini_file:
|
|
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
|
section: "nova"
|
|
option: "install_method"
|
|
value: "{{ nova_install_method }}"
|
|
|
|
- name: Refresh local facts to ensure the nova section is present
|
|
setup:
|
|
filter: ansible_local
|
|
gather_subset: "!all"
|
|
|
|
- name: Install distro packages
|
|
package:
|
|
name: "{{ nova_package_list }}"
|
|
state: "{{ nova_package_state }}"
|
|
update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}"
|
|
cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}"
|
|
register: install_packages
|
|
until: install_packages is success
|
|
retries: 5
|
|
delay: 2
|
|
tags:
|
|
- nova-pip-packages
|
|
|
|
- name: Install the python venv
|
|
import_role:
|
|
name: "python_venv_build"
|
|
vars:
|
|
venv_build_constraints: "{{ nova_git_constraints }}"
|
|
venv_build_distro_package_list: "{{ nova_devel_distro_packages }}"
|
|
venv_install_destination_path: "{{ nova_bin | dirname }}"
|
|
venv_pip_install_args: "{{ nova_pip_install_args }}"
|
|
venv_packages_to_symlink: "{{ (nova_services['nova-compute']['group'] in group_names) | ternary(nova_compute_kvm_packages_to_symlink, []) }}"
|
|
venv_pip_packages: "{{ nova_venv_packages }}"
|
|
venv_facts_when_changed:
|
|
- section: "nova"
|
|
option: "need_service_restart"
|
|
value: "True"
|
|
- section: "nova"
|
|
option: "need_online_data_migrations"
|
|
value: "True"
|
|
- section: "nova"
|
|
option: "venv_tag"
|
|
value: "{{ nova_venv_tag }}"
|
|
when: nova_install_method == 'source'
|
|
|
|
- include_tasks: "consoles/nova_console_{{ nova_console_type }}_install.yml"
|
|
when:
|
|
- "nova_services['nova-novncproxy']['group'] in group_names or
|
|
nova_services['nova-spicehtml5proxy']['group'] in group_names or
|
|
nova_services['nova-serialconsole-proxy']['group'] in group_names"
|
|
- "nova_console_type != 'serialconsole'"
|
|
tags:
|
|
- nova-install
|
|
- nova-novnc-console
|
|
- nova-spice-console
|
|
|
|
- name: Initialise the upgrade facts
|
|
ini_file:
|
|
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
|
section: nova
|
|
option: "{{ item.name }}"
|
|
value: "{{ item.state }}"
|
|
with_items:
|
|
- name: "need_service_restart"
|
|
state: "True"
|
|
- name: "need_online_data_migrations"
|
|
state: "True"
|
|
when:
|
|
- (install_packages | changed) or
|
|
(ansible_local is not defined) or
|
|
('openstack_ansible' not in ansible_local) or
|
|
('nova' not in ansible_local['openstack_ansible']) or
|
|
('need_online_data_migrations' not in ansible_local['openstack_ansible']['nova']) or
|
|
('need_service_restart' not in ansible_local['openstack_ansible']['nova'])
|