kolla-ansible/tests/deploy-ceph-ansible.sh
Radosław Piliszek e7247dbd9a CI: use venv only (and not virtualenv)
It seems we used virtualenv for ceph-ansible only.

Change-Id: I7f9002283462dbe4bae3c1d7ff1dedcc4e7d01f2
2020-06-17 18:24:07 +00:00

27 lines
712 B
Bash
Executable File

#!/bin/bash
set -o xtrace
set -o errexit
# Enable unbuffered output for Ansible in Jenkins.
export PYTHONUNBUFFERED=1
function setup_ceph_ansible {
# Prepare virtualenv for ceph-ansible deployment
python3 -m venv --system-site-packages ~/ceph-venv
~/ceph-venv/bin/pip install -Ir requirements.txt
~/ceph-venv/bin/pip install -IU selinux
}
function deploy_ceph_ansible {
RAW_INVENTORY=/etc/kolla/ceph-inventory
. ~/ceph-venv/bin/activate
cp site-container.yml.sample site-container.yml
ansible-playbook -i ${RAW_INVENTORY} -e @/etc/kolla/ceph-ansible.yml -vvv site-container.yml --skip-tags=with_pkg &> /tmp/logs/ansible/deploy-ceph
}
setup_ceph_ansible
deploy_ceph_ansible