2018-02-15 06:30:38 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# -*- mode: sh; -*-
|
|
|
|
|
|
|
|
# File: before_install.sh
|
2018-02-15 07:08:05 +00:00
|
|
|
# Time-stamp: <2018-02-15 14:08:01>
|
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
|
|
|
|
|
|
|
|
sudo apt-get update
|
2018-02-15 06:35:18 +00:00
|
|
|
sudo apt-get install apt-transport-https
|
2018-02-15 07:04:29 +00:00
|
|
|
# Latest Ansible install
|
|
|
|
sudo pip3 install docker 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
|
|
|
|
|
|
|
|
sudo ln -s ${PWD} /etc/ansible/roles/greendayonfire.mongodb
|