Use zuul checkout for stackhpc-libvirt roles

This allows us to use the Depends-On: syntax in future commits.

Depends-On: https://review.opendev.org/#/c/618511/
Depends-On: https://github.com/stackhpc/ansible-role-libvirt-vm/pull/29
Change-Id: I4007edf0939d21115b0e2699857a4593cae30b74
This commit is contained in:
Will Szumski 2019-05-01 11:39:16 +01:00
parent d7142c04d2
commit 871d3cfd88
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: