puppet-openstack-integration/playbooks/prepare-node-integration.yaml
Takashi Kajinami b89202e267 Glance: Test cinder backend
This enables cinder backend in Glance in scenario 005 job so that we
can test the deployment architecture as part of integration jobs.

Depends-on: https://review.opendev.org/844813
Change-Id: I22d48bc7616caf66157110d6f3f5d66d943aee43
2022-08-01 20:22:13 +09:00

59 lines
2.0 KiB
YAML

- hosts: all
tasks:
- name: Install the qemu-img command (CentOS/RHEL)
dnf:
name: qemu-img
become: true
when:
- ansible_os_family == 'RedHat'
- name: Install the qemu-img command (Ubuntu/Debian)
apt:
name: qemu-utils
become: true
when:
- ansible_os_family == 'Debian'
- shell:
cmd: |
set -e
set -x
ZUUL_BRANCH_REAL=${ZUUL_BRANCH:-master}
# Workaround for puppet-ceph, where we need to checkout
# puppet-openstack-integration from stable/pike when working on
# stable/jewel.
# Ceph Jewel works with Newton to Pike
if [[ "$ZUUL_BRANCH" == "stable/jewel" ]]; then
ZUUL_BRANCH_REAL='stable/pike'
fi
if [ -d /home/zuul/src/opendev.org/openstack/puppet-openstack-integration ]; then
[ ! -d puppet-openstack-integration ] && mkdir puppet-openstack-integration
cp -dR /home/zuul/src/opendev.org/openstack/puppet-openstack-integration/. puppet-openstack-integration
else
git clone -b $ZUUL_BRANCH_REAL https://opendev.org/openstack/puppet-openstack-integration puppet-openstack-integration
fi
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- include_role:
name: bindep
vars:
bindep_dir: "src/opendev.org/openstack/puppet-openstack-integration"
- name: Create folder for gems
file:
path: "{{ ansible_user_dir }}/workspace/puppet-openstack-integration/.bundled_gems"
state: directory
- name: Install bundler
shell:
cmd: |
ruby <<EOF
cmd = 'gem install bundler --no-document --verbose --no-user-install'
cmd += ' -v 2.2.11'
system(cmd)
EOF
environment:
GEM_HOME: "{{ ansible_user_dir }}/workspace/puppet-openstack-integration/.bundled_gems"