James E. Blair 6736ee2251 Add image build jobs
Depends-On: https://review.opendev.org/940561

Change-Id: I691fafc25b377d812d002fae34aef2e0bc8e552a
2025-01-31 15:24:22 -08:00

39 lines
935 B
YAML

- hosts: all
pre_tasks:
- name: Install custom element requirements
become: true
package:
state: present
name:
- python3-yaml
# The following are required for the image upload
- python3-openstacksdk
- python3-oslo.utils
- zstd
- name: Setup dib directories
become: true
shell: |
set -x
mkdir -p /opt/dib_cache
chown {{ ansible_user }} /opt/dib_cache
chgrp {{ ansible_user }} /opt/dib_cache
mkdir -p /opt/dib_tmp
if [ -b /dev/vdb ]; then
DEV='/dev/vdb'
elif [ -b /dev/xvde ]; then
DEV='/dev/xvde'
fi
if [ -n "$DEV" ]; then
mkfs.ext4 $DEV
mount $DEV /opt/dib_tmp
fi
chown {{ ansible_user }} /opt/dib_tmp
chgrp {{ ansible_user }} /opt/dib_tmp
roles:
- make-source-repositories-cache