Add tests
This commit is contained in:
parent
2679ee6cb7
commit
6bba55e4a2
15
.travis.yml
15
.travis.yml
@ -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'
|
||||
|
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