Add tests

This commit is contained in:
Alessandro Fael Garcia 2018-06-26 16:41:35 -07:00
parent 2679ee6cb7
commit 6bba55e4a2
3 changed files with 38 additions and 0 deletions

View File

@ -15,6 +15,9 @@ env:
- distribution: centos
version: 6
playbook: template
- distribution: centos
version: 6
playbook: unit
- distribution: centos
version: 7
playbook: basic
@ -27,6 +30,9 @@ env:
- distribution: centos
version: 7
playbook: push
- distribution: centos
version: 7
playbook: unit
- distribution: debian
version: jessie
playbook: basic
@ -39,6 +45,9 @@ env:
- distribution: debian
version: jessie
playbook: push
- distribution: debian
version: jessie
playbook: unit
- distribution: debian
version: stretch
playbook: basic
@ -51,6 +60,9 @@ env:
- distribution: debian
version: stretch
playbook: push
- distribution: debian
version: stretch
playbook: unit
- distribution: ubuntu
version: trusty
playbook: basic
@ -75,6 +87,9 @@ env:
- distribution: ubuntu
version: xenial
playbook: push
- distribution: ubuntu
version: xenial
playbook: unit
before_install:
- 'sudo docker pull ${distribution}:${version}'
- 'sudo docker build --no-cache --rm --file=tests/dockerfiles/Dockerfile.${distribution}-${version} --tag=${distribution}-${version}:ansible tests'

View File

@ -0,0 +1,14 @@
FROM ubuntu:bionic
RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y software-properties-common && rm -rf /var/lib/apt/lists/*
RUN apt-add-repository -y ppa:ansible/ansible && apt-get update && apt-get install -y \
git \
ansible \
apt-transport-https \
curl \
&& rm -rf /var/lib/apt/lists/*
RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
ENTRYPOINT ["/sbin/init"]

View File

@ -0,0 +1,9 @@
---
- hosts: localhost
become: true
remote_user: root
roles:
- ansible-role-nginx
vars:
unit_enable: true
unit_packages: true