Add legacy-base job to handle /etc/nodepool

Change-Id: I0c1bbdc84e888e16dfb151f720dd178030360dec
This commit is contained in:
Monty Taylor 2017-09-22 11:04:05 -05:00
parent aa274864f8
commit 8e762f9656
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
2 changed files with 32 additions and 0 deletions

25
playbooks/legacy/pre.yaml Normal file
View File

@ -0,0 +1,25 @@
- 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

View File

@ -230,6 +230,12 @@
Check version used by xstatic packages
run: playbooks/xstatic/check-version
- job:
name: legacy-base
description: |
Base job for autoconverted legacy jobs
pre-run: playbooks/legacy/pre
- job:
name: legacy-dsvm-base
description: |
@ -239,6 +245,7 @@
may be used by jobs which have been automatically converted as
part of the migration to Zuul v3.
nodeset: devstack-single-node
pre-run: playbooks/legacy/pre
required-projects:
- openstack-dev/devstack
- openstack-infra/devstack-gate