rally/tests/ci/playbooks/rally-install/pre.yaml

60 lines
1.7 KiB
YAML

- hosts: all
name: Prepare host to install Rally
tasks:
- name: Check whether apt is available
shell:
cmd: "apt-get --version"
executable: /bin/sh
register: apt_get_installed
ignore_errors: True
- name: Check whether dnf is available
shell:
cmd: "dnf --version"
executable: /bin/sh
register: dnf_installed
ignore_errors: True
- name: Check whether yum is available
shell:
cmd: "yum --version"
executable: /bin/sh
register: yum_installed
ignore_errors: True
- name: Install required packages (Centos-7)
when: yum_installed.rc == 0
shell:
cmd: |
sudo yum remove -y python-crypto || true
sudo yum update
sudo yum install -y yum-utils
sudo yum groupinstall -y development
sudo yum install -y https://centos7.iuscommunity.org/ius-release.rpm
sudo yum install -y python36u python36u-devel
curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
sudo python3 /tmp/get-pip.py
- name: Install required packages (Ubuntu)
when: apt_get_installed.rc == 0
shell:
chdir: '{{ zuul.project.src_dir }}'
cmd: |
# NOTE(pabelanger): We run apt-get update to ensure we dont have a stale
# package cache in the gate.
sudo apt-get update
- name: Install bindep
shell:
cmd: |
sudo pip3 install bindep
- name: Prepare rally plugins stored at home dir
shell:
cmd: |
mkdir --parents ~/.rally/plugins
cp --recursive {{ zuul.project.src_dir }}/rally-jobs/plugins/* ~/.rally/plugins