Add tests
This commit is contained in:
parent
2679ee6cb7
commit
6bba55e4a2
15
.travis.yml
15
.travis.yml
@ -15,6 +15,9 @@ env:
|
|||||||
- distribution: centos
|
- distribution: centos
|
||||||
version: 6
|
version: 6
|
||||||
playbook: template
|
playbook: template
|
||||||
|
- distribution: centos
|
||||||
|
version: 6
|
||||||
|
playbook: unit
|
||||||
- distribution: centos
|
- distribution: centos
|
||||||
version: 7
|
version: 7
|
||||||
playbook: basic
|
playbook: basic
|
||||||
@ -27,6 +30,9 @@ env:
|
|||||||
- distribution: centos
|
- distribution: centos
|
||||||
version: 7
|
version: 7
|
||||||
playbook: push
|
playbook: push
|
||||||
|
- distribution: centos
|
||||||
|
version: 7
|
||||||
|
playbook: unit
|
||||||
- distribution: debian
|
- distribution: debian
|
||||||
version: jessie
|
version: jessie
|
||||||
playbook: basic
|
playbook: basic
|
||||||
@ -39,6 +45,9 @@ env:
|
|||||||
- distribution: debian
|
- distribution: debian
|
||||||
version: jessie
|
version: jessie
|
||||||
playbook: push
|
playbook: push
|
||||||
|
- distribution: debian
|
||||||
|
version: jessie
|
||||||
|
playbook: unit
|
||||||
- distribution: debian
|
- distribution: debian
|
||||||
version: stretch
|
version: stretch
|
||||||
playbook: basic
|
playbook: basic
|
||||||
@ -51,6 +60,9 @@ env:
|
|||||||
- distribution: debian
|
- distribution: debian
|
||||||
version: stretch
|
version: stretch
|
||||||
playbook: push
|
playbook: push
|
||||||
|
- distribution: debian
|
||||||
|
version: stretch
|
||||||
|
playbook: unit
|
||||||
- distribution: ubuntu
|
- distribution: ubuntu
|
||||||
version: trusty
|
version: trusty
|
||||||
playbook: basic
|
playbook: basic
|
||||||
@ -75,6 +87,9 @@ env:
|
|||||||
- distribution: ubuntu
|
- distribution: ubuntu
|
||||||
version: xenial
|
version: xenial
|
||||||
playbook: push
|
playbook: push
|
||||||
|
- distribution: ubuntu
|
||||||
|
version: xenial
|
||||||
|
playbook: unit
|
||||||
before_install:
|
before_install:
|
||||||
- 'sudo docker pull ${distribution}:${version}'
|
- 'sudo docker pull ${distribution}:${version}'
|
||||||
- 'sudo docker build --no-cache --rm --file=tests/dockerfiles/Dockerfile.${distribution}-${version} --tag=${distribution}-${version}:ansible tests'
|
- 'sudo docker build --no-cache --rm --file=tests/dockerfiles/Dockerfile.${distribution}-${version} --tag=${distribution}-${version}:ansible tests'
|
||||||
|
14
tests/dockerfiles/Dockerfile.ubuntu-bionic
Normal file
14
tests/dockerfiles/Dockerfile.ubuntu-bionic
Normal 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"]
|
9
tests/playbooks/nginx-unit.yml
Normal file
9
tests/playbooks/nginx-unit.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
- hosts: localhost
|
||||||
|
become: true
|
||||||
|
remote_user: root
|
||||||
|
roles:
|
||||||
|
- ansible-role-nginx
|
||||||
|
vars:
|
||||||
|
unit_enable: true
|
||||||
|
unit_packages: true
|
Loading…
Reference in New Issue
Block a user