Skip to content

Commit 6bba55e

Browse files
committed
Add tests
1 parent 2679ee6 commit 6bba55e

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

.travis.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ env:
1515
- distribution: centos
1616
version: 6
1717
playbook: template
18+
- distribution: centos
19+
version: 6
20+
playbook: unit
1821
- distribution: centos
1922
version: 7
2023
playbook: basic
@@ -27,6 +30,9 @@ env:
2730
- distribution: centos
2831
version: 7
2932
playbook: push
33+
- distribution: centos
34+
version: 7
35+
playbook: unit
3036
- distribution: debian
3137
version: jessie
3238
playbook: basic
@@ -39,6 +45,9 @@ env:
3945
- distribution: debian
4046
version: jessie
4147
playbook: push
48+
- distribution: debian
49+
version: jessie
50+
playbook: unit
4251
- distribution: debian
4352
version: stretch
4453
playbook: basic
@@ -51,6 +60,9 @@ env:
5160
- distribution: debian
5261
version: stretch
5362
playbook: push
63+
- distribution: debian
64+
version: stretch
65+
playbook: unit
5466
- distribution: ubuntu
5567
version: trusty
5668
playbook: basic
@@ -75,6 +87,9 @@ env:
7587
- distribution: ubuntu
7688
version: xenial
7789
playbook: push
90+
- distribution: ubuntu
91+
version: xenial
92+
playbook: unit
7893
before_install:
7994
- 'sudo docker pull ${distribution}:${version}'
8095
- 'sudo docker build --no-cache --rm --file=tests/dockerfiles/Dockerfile.${distribution}-${version} --tag=${distribution}-${version}:ansible tests'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM ubuntu:bionic
2+
3+
RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y software-properties-common && rm -rf /var/lib/apt/lists/*
4+
5+
RUN apt-add-repository -y ppa:ansible/ansible && apt-get update && apt-get install -y \
6+
git \
7+
ansible \
8+
apt-transport-https \
9+
curl \
10+
&& rm -rf /var/lib/apt/lists/*
11+
12+
RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
13+
14+
ENTRYPOINT ["/sbin/init"]

tests/playbooks/nginx-unit.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
- hosts: localhost
3+
become: true
4+
remote_user: root
5+
roles:
6+
- ansible-role-nginx
7+
vars:
8+
unit_enable: true
9+
unit_packages: true

0 commit comments

Comments
 (0)