33461bbecc
Adds yamllint to the linters with a minimal configuration, some rules are disabled to allow us to fix them in follow-ups, if we agree on them. Fixes invalid YAML file containing characters inside block. Fixes few minor linting issues. Change-Id: I936fe2c997597972d884c5fc62655d28e8aaf8c5
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
- hosts: all
|
|
tasks:
|
|
- name: Include ensure-pip
|
|
include_role:
|
|
name: ensure-pip
|
|
|
|
- name: Sanity check provided virtualenv command works
|
|
shell: |
|
|
tmp_venv=$(mktemp -d -t venv-XXXXXXXXXX)
|
|
trap "rm -rf $tmp_venv" EXIT
|
|
{{ ensure_pip_virtualenv_command }} $tmp_venv
|
|
$tmp_venv/bin/pip install tox
|
|
failed_when: false
|
|
register: _venv_sanity
|
|
|
|
- name: Assert pip venv sanity check
|
|
fail:
|
|
msg: 'The virtualenv_command: "{{ ensure_pip_virtualenv_command }}" does not appear to work!'
|
|
when:
|
|
- _venv_sanity.rc != 0
|
|
|
|
- name: Include ensure-virtualenv
|
|
include_role:
|
|
name: ensure-virtualenv
|
|
|
|
- name: Sanity check virtualenv command works
|
|
shell: |
|
|
tmp_venv=$(mktemp -d -t venv-XXXXXXXXXX)
|
|
trap "rm -rf $tmp_venv" EXIT
|
|
virtualenv $tmp_venv
|
|
$tmp_venv/bin/pip install tox
|
|
failed_when: false
|
|
register: _virtualenv_sanity
|
|
|
|
- name: Assert sanity check
|
|
fail:
|
|
msg: 'The virtualenv command does not appear to work!'
|
|
when:
|
|
- _virtualenv_sanity.rc != 0
|
|
|
|
# NOTE(ianw) : this does not play nicely with pip-and-virtualenv which
|
|
# has already installed from source. We might be able to test this
|
|
# once it's gone...
|
|
|
|
# - hosts: all
|
|
# roles:
|
|
# - role: ensure-pip
|
|
# vars:
|
|
# ensure_pip_from_upstream: True
|
|
|