Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
systemroller committed Aug 26, 2020
1 parent 5f64332 commit 54d04c1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .travis/runtox
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,24 @@ ME=$(basename $0)
SCRIPTDIR=$(readlink -f $(dirname $0))
BANNERSIZE=90

# LSR_MOLECULE_DOCKER_VERSION is the version string to pass
# to pip install - this is usually a comparison operator
# followed by a version number e.g. '<4.3' but in reality
# may be anything that pip allows to follow a package name
# in an install specification
if [ -z "${LSR_MOLECULE_DOCKER_VERSION:-}" ]; then
if type docker > /dev/null 2>&1; then
DOCKER_SERVER_API_VERSION=$(docker version --format '{{.Server.APIVersion}}')
case "$DOCKER_SERVER_API_VERSION" in
1.3[0-8]|1.[0-2]*) LSR_MOLECULE_DOCKER_VERSION='<4.3';;
*) LSR_MOLECULE_DOCKER_VERSION="";;
esac
else
LSR_MOLECULE_DOCKER_VERSION=""
fi
fi
export LSR_MOLECULE_DOCKER_VERSION

. ${SCRIPTDIR}/utils.sh
. ${SCRIPTDIR}/config.sh

Expand Down
3 changes: 3 additions & 0 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ lint:
options:
config-file: .yamllint.yml
platforms:
- name: centos-6
image: docker.io/linuxsystemroles/centos-6
privileged: true
- name: centos-7
image: docker.io/linuxsystemroles/centos-7
volumes:
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,9 @@ commands =
[molecule_common]
changedir = {toxinidir}
deps =
ansible-lint==4.2.0
{env:LSR_ANSIBLE_DEP:ansible}
docker
docker{env:LSR_MOLECULE_DOCKER_VERSION:}
molecule<3
selinux
wcwidth==0.1.9;python_version=="3.6"
Expand Down

0 comments on commit 54d04c1

Please sign in to comment.