diff --git a/playbooks/legacy/pre.yaml b/playbooks/legacy/pre.yaml new file mode 100644 index 00000000..540f33c0 --- /dev/null +++ b/playbooks/legacy/pre.yaml @@ -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 diff --git a/zuul.yaml b/zuul.yaml index e0e42589..5176198a 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -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