1#!/usr/bin/env bash
2
3set -eu -o pipefail
4source virtualenv.sh
5set +x
6
7# Verify libyaml is in use.
8ansible --version | tee /dev/stderr | grep 'with libyaml'
9
10# Run tests with libyaml.
11ansible-playbook runme.yml "${@}"
12
13# deps are already installed, using --no-deps to avoid re-installing them
14# Install PyYAML without libyaml to validate ansible can run
15PYYAML_FORCE_LIBYAML=0 pip install --no-binary PyYAML --ignore-installed --no-cache-dir --no-deps PyYAML
16
17# Verify libyaml is not in use.
18ansible --version | tee /dev/stderr | grep 'without libyaml'
19
20# Run tests without libyaml.
21ansible-playbook runme.yml "${@}"
22