6aa925e792
Distributions provide packages for the OpenStack services so we add support for using these instead of the pip ones. Change-Id: I7eb1cbe2c80ee889d2ae08dcfed6a19cc1bd3415 Depends-On: Ide70b5d8f67d8c8a87e3f16671f0f7fb72338b89 Depends-On: I8de48eb1fb4c8d321098ca54b9e21270edc7ac87 Depends-On: Ia5fda5d417b79189d048c8891b84d57331df1404 Implements: blueprint openstack-distribution-packages
43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
---
|
|
|
|
- name: Record the installation method
|
|
ini_file:
|
|
dest: "/etc/ansible/facts.d/openstack_ansible.fact"
|
|
section: "octavia"
|
|
option: "install_method"
|
|
value: "{{ octavia_install_method }}"
|
|
|
|
- name: Refresh local facts to ensure the octavia section is present
|
|
setup:
|
|
filter: ansible_local
|
|
gather_subset: "!all"
|
|
|
|
- name: Install distro packages
|
|
package:
|
|
name: "{{ octavia_package_list }}"
|
|
state: "{{ octavia_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
|
|
|
|
- name: Install the python venv
|
|
import_role:
|
|
name: "python_venv_build"
|
|
vars:
|
|
venv_build_constraints: "{{ octavia_git_constraints }}"
|
|
venv_install_destination_path: "{{ octavia_bin | dirname }}"
|
|
venv_install_distro_package_list: "{{ octavia_distro_packages }}"
|
|
venv_pip_install_args: "{{ octavia_pip_install_args }}"
|
|
venv_pip_packages: "{{ octavia_pip_packages | union(octavia_user_pip_packages) +
|
|
(octavia_oslomsg_amqp1_enabled | bool) | ternary(octavia_optional_oslomsg_amqp1_pip_packages, []) }}"
|
|
venv_facts_when_changed:
|
|
- section: "octavia"
|
|
option: "venv_tag"
|
|
value: "{{ octavia_venv_tag }}"
|
|
tags:
|
|
- octavia-install
|
|
when: octavia_install_method == 'source'
|