puppet-openstack-integration/playbooks/prepare-node-integration.yaml
Takashi Kajinami e91c3d6be4 Drop logic for old puppet-ceph branches
... because these were already removed.

Change-Id: Ibdac9f450d0dba2408e13fd2f2bc1f7c759ebd63
2024-03-08 18:23:24 +09:00

51 lines
1.6 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}
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'
system(cmd)
EOF
environment:
GEM_HOME: "{{ ansible_user_dir }}/workspace/puppet-openstack-integration/.bundled_gems"