Some additional work on role tests. All blind on an airplane, wheeee.

This commit is contained in:
Jeff Geerling 2017-05-26 23:22:04 -04:00
parent 5640fffb6e
commit 2f3dc7446d
3 changed files with 17 additions and 5 deletions

View File

@ -20,8 +20,9 @@ script:
# Run tests.
- ${PWD}/tests/test.sh
# Test whether Docker is running correctly (Dockerception!).
- docker exec --tty ${container_id} docker run hello-world
# Test whether docker-py is installed at the specified version.
- docker exec --tty ${container_id} pip list installed | grep -e '^ipaddress.*1\.0\.18.*$'
- docker exec --tty ${container_id} pip list installed | grep '^colorama'
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/

View File

@ -17,11 +17,14 @@ Available variables are listed below, along with default values (see `defaults/m
A list of packages to install with pip. Examples below:
pip_install_packages:
# Specify a name and version.
# Specify names and versions.
- name: docker-py
version: 1.2.3
# Or specify a package by itself.
version: "1.2.3"
- name: awscli
version: "1.11.91"
# Or specify bare packages to get the latest release.
- docker-py
- awscli
## Dependencies

View File

@ -1,6 +1,14 @@
---
- hosts: all
vars:
pip_install_packages:
# Test installing a specific version of a package.
- name: ipaddress
version: "1.0.18"
# Test installing a package by name.
- colorama
pre_tasks:
- name: Update apt cache.
apt: update_cache=yes cache_valid_time=600