Set nolock for nfs mount for mysql and templating a testing framework
This commit is contained in:
28
test/Dockerfile-ubuntu-xenial
Normal file
28
test/Dockerfile-ubuntu-xenial
Normal file
@@ -0,0 +1,28 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
MAINTAINER Jacob Cody Wimer <jacob.wimer@gmail.com>
|
||||
|
||||
RUN apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install -y -q \
|
||||
build-essential \
|
||||
python python-dev python-pip \
|
||||
libffi-dev libssl-dev \
|
||||
libxml2-dev libxslt1-dev zlib1g-dev \
|
||||
git \
|
||||
openssl \
|
||||
openssh-server \
|
||||
ca-certificates \
|
||||
apt-transport-https \
|
||||
sudo \
|
||||
&& pip install --upgrade setuptools pip wheel \
|
||||
&& pip install --upgrade pyyaml jinja2 pycrypto \
|
||||
&& pip install --upgrade pywinrm \
|
||||
&& apt-get -qq clean \
|
||||
&& rm -rf \
|
||||
/var/lib/apt/lists/* \
|
||||
/tmp/* \
|
||||
/var/tmp/*
|
||||
|
||||
RUN mkdir /ansible
|
||||
VOLUME /ansible
|
||||
6
test/ansible-test
Normal file
6
test/ansible-test
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
pushd /ansible
|
||||
pip install pipenv
|
||||
pipenv install
|
||||
pipenv run ansible-playbook -i test-inventory --connection=local playbooks/site.yml
|
||||
14
test/run-tests.sh
Normal file
14
test/run-tests.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
project_dir="$( dirname $(dirname $(readlink -f $0)))"
|
||||
|
||||
docker build -t xenial-ansible -f ${project_dir}/test/Dockerfile-ubuntu-xenial ${project_dir}
|
||||
|
||||
docker run -it \
|
||||
-v ${project_dir}:/ansible \
|
||||
-v /etc/timezone:/etc/timezone:ro \
|
||||
-v /etc/localtime:/etc/localtime:ro \
|
||||
--rm --privileged \
|
||||
xenial-ansible \
|
||||
/ansible/test/ansible-test
|
||||
|
||||
Reference in New Issue
Block a user