47 lines
1.6 KiB
YAML
47 lines
1.6 KiB
YAML
- hosts: all
|
|
tasks:
|
|
- name: Create nodepool directory
|
|
file:
|
|
path: /etc/nodepool
|
|
state: directory
|
|
- name: Create nodepool subnodes file
|
|
copy:
|
|
dest: /etc/nodepool/sub_nodes_private
|
|
content: ""
|
|
- name: Populate nodepool subnodes file
|
|
lineinfile:
|
|
path: /etc/nodepool/sub_nodes_private
|
|
line: "{{ hostvars[item]['nodepool']['private_ipv4'] }}"
|
|
with_items: "{{ groups['subnodes'] }}"
|
|
when: groups['subnodes'] is defined
|
|
- name: Create nodepool primary file
|
|
copy:
|
|
dest: /etc/nodepool/primary_node_private
|
|
content: "{{ hostvars['primary']['nodepool']['private_ipv4'] }}"
|
|
- name: Copy ssh keys to nodepool directory
|
|
command: "cp .ssh/{{ item }} /etc/nodepool/{{ item }}"
|
|
with_items:
|
|
- id_rsa
|
|
- id_rsa.pub
|
|
|
|
- hosts: primary
|
|
environment:
|
|
WORKSPACE: "{{ ansible_user_dir }}"
|
|
ZUUL_BRANCH: "{{ zuul.branch }}"
|
|
BUILD_TIMEOUT: 10800000
|
|
tasks:
|
|
- name: Write legacy shell
|
|
copy:
|
|
content: "{{ devstack_legacy_shell }}"
|
|
dest: "{{ ansible_user_dir }}/devstack-legacy.sh"
|
|
mode: 0755
|
|
- name: Run devstack-gate wrapper script
|
|
shell: |
|
|
# The devstack-gate scripts expect a WORKSPACE to exist which has
|
|
# devstack-gate inside of it. We could also maybe set WORKSPACE
|
|
# to src/git.openstack.org/openstack-infra - but that seems weird.
|
|
ln -s src/git.openstack.org/openstack-infra/devstack-gate .
|
|
./devstack-legacy.sh
|
|
args:
|
|
executable: /bin/bash
|