d94e57f17b
With update of ansible-lint to version >=6.0.0 a lot of new linters were added, that enabled by default. In order to comply with linter rules we're applying changes to the role. With that we also update metdata to reflect current state. Change-Id: Id8215882ee528d4c3055479e770c7432616649ba
49 lines
1.6 KiB
YAML
49 lines
1.6 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 }}"
|
|
mode: "0644"
|
|
|
|
- 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_facts['pkg_mgr'] == 'apt') | ternary('yes', omit) }}"
|
|
cache_valid_time: "{{ (ansible_facts['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_python_executable: "{{ octavia_venv_python_executable }}"
|
|
venv_build_constraints: "{{ octavia_git_constraints }}"
|
|
venv_build_distro_package_list: "{{ octavia_devel_distro_packages }}"
|
|
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'
|