ansible-role-mongodb/tests/scripts/before_install.sh

28 lines
642 B
Bash
Raw Normal View History

2018-02-15 06:30:38 +00:00
#!/usr/bin/env bash
# -*- mode: sh; -*-
# File: before_install.sh
2018-02-15 07:40:35 +00:00
# Time-stamp: <2018-02-15 14:40:30>
2018-02-15 06:30:38 +00:00
# Copyright (C) 2018 Sergei Antipov
# Description:
# set -o xtrace
set -o nounset
set -o errexit
set -o pipefail
2018-02-15 07:04:29 +00:00
# Latest Ansible install
2018-02-15 07:40:35 +00:00
pip install docker-py ansible
2018-02-15 07:08:05 +00:00
ansible --version
docker version
2018-02-15 06:30:38 +00:00
# Pull docker image or build it
if [ -f tests/Dockerfile.${DISTRIBUTION}_${DIST_VERSION} ]
then
sudo docker build --rm=true --file=tests/Dockerfile.${DISTRIBUTION}_${DIST_VERSION}
--tag ${DISTRIBUTION}:${DIST_VERSION} tests
else
sudo docker pull ${DISTRIBUTION}:${DIST_VERSION}
fi
2018-02-15 07:26:38 +00:00
ln -s ${PWD} tests/greendayonfire.mongodb