3c1b9c4d9a
Kolla removed support for binary images in the Zed release, as well as the install_type config option. It also changed the image tag format. Yoga & earlier: openstack.kolla/centos-source-base:yoga Zed & later: openstack.kolla/base:zed-centos-stream9 This change removes the kolla_install_type variable. It also adds a kolla_base_distro_version variable, which is passed to kolla and kolla-ansible. The following two variables are also removed, since all images are now of type source: * overcloud_container_image_regex_map_source * overcloud_container_image_regexes_source Change-Id: I0023765438c0c73394c3465828c4d98f766d9350
65 lines
2.5 KiB
YAML
65 lines
2.5 KiB
YAML
---
|
|
- name: Test kolla-ansible role requirements
|
|
hosts: localhost
|
|
connection: local
|
|
tasks:
|
|
- name: Create a temporary directory
|
|
tempfile:
|
|
state: directory
|
|
register: tempfile_result
|
|
|
|
- block:
|
|
- name: Test the kolla-ansible role with extra Python requirements
|
|
include_role:
|
|
name: ../../kolla-ansible
|
|
vars:
|
|
kolla_ansible_source_path: "{{ temp_path }}/src"
|
|
kolla_ansible_ctl_install_type: "source"
|
|
kolla_ansible_source_url: "http://github.com/openstack/kolla-ansible"
|
|
kolla_ansible_source_version: "{{ openstack_branch }}"
|
|
kolla_ansible_venv: "{{ temp_path }}/venv"
|
|
kolla_ansible_venv_extra_requirements:
|
|
- "hvac"
|
|
kolla_config_path: "{{ temp_path }}/etc/kolla"
|
|
kolla_node_custom_config_path: "{{ temp_path }}/etc/kolla/config"
|
|
kolla_ansible_passwords_path: "{{ temp_path }}/passwords.yml"
|
|
# Required config.
|
|
kolla_base_distro: "fake-distro"
|
|
kolla_base_distro_version: "1.23"
|
|
kolla_docker_namespace: "fake-namespace"
|
|
kolla_openstack_release: "fake-release"
|
|
kolla_internal_vip_address: "10.0.0.1"
|
|
kolla_internal_fqdn: "fake.internal.fqdn"
|
|
kolla_external_vip_address: "10.0.0.2"
|
|
kolla_external_fqdn: "fake.external.fqdn"
|
|
kolla_ansible_certificates_path: "{{ temp_path }}/etc/kayobe/kolla/certificates"
|
|
kolla_enable_tls_external: False
|
|
kolla_enable_tls_internal: False
|
|
kolla_enable_grafana: False
|
|
kolla_openstack_logging_debug: False
|
|
kolla_globals_paths_extra:
|
|
- "{{ tempfile_result.path ~ '/etc/kayobe/' }}"
|
|
apt_cache_valid_time: 3600
|
|
|
|
- name: List Python packages installed in virtualenv
|
|
command: "{{ temp_path }}/venv/bin/pip list"
|
|
register: kolla_ansible_venv_pip_list
|
|
changed_when: False
|
|
|
|
- name: Verify extra requirements are installed in virtualenv
|
|
assert:
|
|
that:
|
|
- "'hvac' in kolla_ansible_venv_pip_list.stdout"
|
|
|
|
always:
|
|
- name: Ensure the temporary directory is removed
|
|
file:
|
|
path: "{{ temp_path }}"
|
|
state: absent
|
|
rescue:
|
|
- name: Flag that a failure occurred
|
|
set_fact:
|
|
test_failures: "{{ test_failures | default(0) | int + 1 }}"
|
|
vars:
|
|
temp_path: "{{ tempfile_result.path }}"
|