Files
kolla/tests/playbooks/run.yml
Michal Nasiadka af632db5d1 CI: Use ansible-lint for CI roles and playbooks
Removing dbus-python deps because now a-c-k handles that.

Depends-On: https://review.opendev.org/c/openstack/ansible-collection-kolla/+/942179

Change-Id: I97a97da73a7ccb27789e979656867e4adfe8a633
2025-02-20 10:59:30 +00:00

72 lines
2.3 KiB
YAML

---
- name: Zuul run
hosts: all
vars_files:
- ../vars/zuul.yml
vars:
tag_suffix: "{{ '-aarch64' if base_arch == 'aarch64' else '' }}"
kolla_build_config:
DEFAULT:
debug: true
logs_dir: "{{ kolla_build_logs_dir }}"
quiet: true
base: "{{ base_distro }}"
base_arch: "{{ base_arch }}"
engine: "{{ container_engine }}"
template_override: /etc/kolla/template_overrides.j2
# NOTE(yoctozepto): to avoid issues with IPv6 not enabled in the docker daemon
# and since we don't need isolated networks here, use host networking
network_mode: host
tasks:
- name: Ensure /etc/kolla exists
ansible.builtin.file:
path: /etc/kolla
state: directory
mode: "0777"
become: true
- name: Use ubuntu/debian base image from mirror
vars:
kolla_mirror_config:
DEFAULT:
base_image: "quay.io/openstack.kolla/{{ base_distro }}"
ansible.builtin.set_fact:
kolla_build_config: "{{ kolla_build_config | combine(kolla_mirror_config, recursive=True) }}"
when: base_distro in ['debian', 'ubuntu']
- name: Add publisher config
vars:
kolla_publisher_config:
DEFAULT:
namespace: "{{ kolla_namespace }}"
tag: "{{ zuul.branch | basename }}-{{ base_distro }}-{{ base_distro_version }}{{ tag_suffix }}"
ansible.builtin.set_fact:
kolla_build_config: "{{ kolla_build_config | combine(kolla_publisher_config, recursive=True) }}"
when:
- publisher
- name: Add external docker dir config
vars:
kolla_build_external_docker_config:
DEFAULT:
docker_dir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/tests/templates/docker"
releaser:
type: git
reference: master
location: "https://opendev.org/openstack/releases.git"
releaser-user:
uid: 56000
gid: 56000
ansible.builtin.set_fact:
kolla_build_config: "{{ kolla_build_config | combine(kolla_build_external_docker_config, recursive=True) }}"
when:
- not publisher
- name: Import kolla-build-config role
import_role:
name: kolla-build-config
- name: Import kolla-build role
import_role:
name: kolla-build