9206748e9d
In zuul, roles can be easily included cross repos, while playbooks need to be replicated and copied. This change creates three roles roles, and move tasks to be included in the new roles, so the playbooks are just minimal, and replicating them is not a problem since the logic is in roles that are included The common variables are loaded in the role common, the node preparation i moved to the prepare-node role, and it's now called in the pre,yaml playbook in pre-run. run-test role contains the rendering of bash scripts and effective test run Taiga-id: https://tree.taiga.io/project/tripleo-ci-board/task/112 Change-Id: Ie51fcfbee79727d04fca47d26a5ed8ad44ed3bf6
60 lines
1.6 KiB
YAML
60 lines
1.6 KiB
YAML
- name: Swap is essential as we are not meeting memory requirements
|
|
include_role:
|
|
name: configure-swap
|
|
|
|
- name: Set legacy log path
|
|
include_role:
|
|
name: set-zuul-log-path-fact
|
|
|
|
- name: Ensure legacy workspace directory
|
|
file:
|
|
path: '{{ workspace }}'
|
|
state: directory
|
|
|
|
- name: Ensure legacy logs directory
|
|
file:
|
|
path: '{{ workspace }}/logs'
|
|
state: directory
|
|
|
|
- name: Assure src folder has safe permissions
|
|
# Workaround for https://bugs.launchpad.net/tripleo/+bug/1807703
|
|
file:
|
|
path: /home/zuul/src/
|
|
state: directory
|
|
mode: u=rwX,g=rX,o=rX
|
|
recurse: yes
|
|
|
|
- name: Copy tripleo-ci to openstack namespace dir
|
|
shell:
|
|
cmd: |
|
|
set -e
|
|
set -x
|
|
# we still need all the repos under the same root directory, but instead of using
|
|
# zuul-cloner, use the wrapped commands directly
|
|
# reflink is an safer alternative to hardlinking which could fail
|
|
cp -dR --reflink=auto /home/zuul/src/git.openstack.org/openstack-infra/tripleo-ci .
|
|
executable: /bin/bash
|
|
chdir: '{{ tripleo_root }}'
|
|
environment: '{{ zuul | zuul_legacy_vars }}'
|
|
|
|
- name: "set zull_dump"
|
|
set_fact:
|
|
zuul_dump: "{{ {'zuul': zuul} }}"
|
|
|
|
- name: Dump zuul variables on the host to pass it to inner ansible
|
|
copy:
|
|
content: "{{ zuul_dump|to_nice_yaml }}"
|
|
dest: "{{ workspace }}/logs/zuul-variables.yaml"
|
|
|
|
- name: Remove package exclusions from package manager
|
|
become: true
|
|
ini_file:
|
|
path: "{{ item }}"
|
|
section: main
|
|
option: exclude
|
|
state: absent
|
|
failed_when: false
|
|
with_items:
|
|
- /etc/yum.conf
|
|
- /etc/dnf/dnf.conf
|