Merge "Use zuul checkout for stackhpc-libvirt roles"

This commit is contained in:
Zuul 2019-08-23 16:54:42 +00:00 committed by Gerrit Code Review
commit 6c59a5b507
4 changed files with 33 additions and 0 deletions

View File

@ -24,6 +24,11 @@
requirements: "{{ tenks_src_dir }}/requirements.txt"
virtualenv: "{{ tenks_venv }}"
- name: Template requirements overrides
template:
src: requirements-overrides.yml.j2
dest: "{{ tenks_requirements_overrides_path }}"
- name: Install Ansible Galaxy dependencies
vars:
ansible_galaxy_bin: "{{ tenks_venv }}/bin/ansible-galaxy"
@ -33,6 +38,17 @@
-p {{ tenks_src_dir }}/ansible/roles
chdir: "{{ tenks_src_dir }}"
- name: Override Galaxy dependencies with equivalent modules from the zuul checkout
# We override so that as we add more dependenices we won't have to keep two files in
# sync
vars:
ansible_galaxy_bin: "{{ tenks_venv }}/bin/ansible-galaxy"
command:
cmd: >-
{{ ansible_galaxy_bin }} install -f -r "{{ tenks_requirements_overrides_path }}"
-p {{ tenks_src_dir }}/ansible/roles
chdir: "{{ tenks_src_dir }}"
- name: Ensure network bridge for physnet1 exists
command: "{{ item }}"
become: true

View File

@ -0,0 +1,10 @@
---
# Override these ansible roles to point to the zuul source checkout
# so that we can rely on Depends-On: syntax
- src: git+{{ stackhpc_libvirt_host_src_dir }}/.git
name: stackhpc.libvirt-host
- src: git+{{ stackhpc_libvirt_vm_src_dir }}/.git
name: stackhpc.libvirt-vm

View File

@ -3,8 +3,13 @@
# Variables shared between the playbooks
tenks_src_dir: "{{ ansible_env.HOME ~ '/' ~ zuul.projects['opendev.org/openstack/tenks'].src_dir }}"
stackhpc_libvirt_host_src_dir: >-
{{ ansible_env.HOME ~ '/' ~ zuul.projects['github.com/stackhpc/ansible-role-libvirt-host'].src_dir }}
stackhpc_libvirt_vm_src_dir: >-
{{ ansible_env.HOME ~ '/' ~ zuul.projects['github.com/stackhpc/ansible-role-libvirt-vm'].src_dir }}
upper_constraints_path: "{{ ansible_env.HOME ~ '/' ~ zuul.projects['opendev.org/openstack/requirements'].src_dir ~ '/upper-constraints.txt' }}"
tenks_venv: "{{ ansible_env.HOME ~ '/' ~ 'venv-tenks' }}"
config_dir: "{{ ansible_env.HOME ~ '/' ~ 'tenks-config' }}"
tenks_overrides_path: "{{ config_dir ~ '/' ~ 'tenks-overrides.yml' }}"
tenks_requirements_overrides_path: "{{ tenks_src_dir }}/requirements-overrides.yml"
logs_dir: "/tmp/logs"

View File

@ -11,6 +11,8 @@
post-run: playbooks/tenks-deploy-teardown/post.yml
required-projects:
- name: openstack/requirements
- name: stackhpc/ansible-role-libvirt-vm
- name: stackhpc/ansible-role-libvirt-host
attempts: 1
timeout: 1800
irrelevant-files: