Zuul v3: add role to set up base dir
Change-Id: I825b6fda85997d59dc136280f03e7497eb7b3c2e
This commit is contained in:
parent
2938caf24e
commit
a33308eb3b
|
@ -1,3 +1,5 @@
|
|||
- hosts: all
|
||||
roles:
|
||||
- write-devstack-local-conf
|
||||
- setup-devstack-source-dirs
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
Set up the devstack source directories
|
||||
|
||||
Ensure that the base directory exists, and then move the source repos
|
||||
into it.
|
||||
|
||||
**Role Variables**
|
||||
|
||||
.. zuul:rolevar:: devstack_base_dir
|
||||
:default: /opt/stack
|
||||
|
||||
The devstack base directory.
|
|
@ -0,0 +1 @@
|
|||
devstack_base_dir: /opt/stack
|
|
@ -0,0 +1,17 @@
|
|||
- name: Create base directory
|
||||
file: path={{ devstack_base_dir }} state=directory
|
||||
become: yes
|
||||
|
||||
- name: Find all source repos used by this job
|
||||
find:
|
||||
paths:
|
||||
- src/git.openstack.org/openstack
|
||||
- src/git.openstack.org/openstack-dev
|
||||
- src/git.openstack.org/openstack-infra
|
||||
file_type: directory
|
||||
register: found_repos
|
||||
|
||||
- name: Move Zuul repos into place
|
||||
command: mv {{ item.path }} {{ devstack_base_dir }}
|
||||
with_items: '{{ found_repos.files }}'
|
||||
become: yes
|
Loading…
Reference in New Issue