Skip to content

Commit e0424d2

Browse files
committed
Adjust Travis file for easier maintenance.
1 parent 0461f0c commit e0424d2

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

.travis.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,23 @@ env:
66
# https://github.com/travis-ci/travis-ci/issues/6461#issuecomment-239577306
77
DOCKER_VERSION: "1.9.1-0~trusty"
88
matrix:
9-
- repository: geerlingguy/docker-centos6-ansible
10-
version: latest
9+
- distro: centos6
1110
init: /sbin/init
1211
run_opts: ""
1312
playbook: test.yml
14-
- repository: geerlingguy/docker-centos7-ansible
15-
version: latest
13+
- distro: centos7
1614
init: /usr/lib/systemd/systemd
1715
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
1816
playbook: centos-7-test.yml
19-
- repository: geerlingguy/docker-ubuntu1604-ansible
20-
version: latest
17+
- distro: ubuntu1604
2118
init: /lib/systemd/systemd
2219
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
2320
playbook: test.yml
24-
- repository: geerlingguy/docker-ubuntu1404-ansible
25-
version: latest
21+
- distro: ubuntu1404
2622
init: /sbin/init
2723
run_opts: ""
2824
playbook: test.yml
29-
# - repository: geerlingguy/docker-ubuntu1204-ansible
25+
# - distro: ubuntu1204
3026
# version: latest
3127
# init: /sbin/init
3228
# run_opts: ""
@@ -42,12 +38,12 @@ before_install:
4238
- sudo apt-get install docker-engine=$DOCKER_VERSION -yq --no-install-suggests --no-install-recommends --force-yes -o Dpkg::Options::="--force-confnew"
4339

4440
# Pull container
45-
- 'sudo docker pull ${repository}:${version}'
41+
- 'sudo docker pull geerlingguy/docker-${distro}-ansible:latest'
4642

4743
script:
4844
- container_id=$(mktemp)
4945
# Run container in detached state
50-
- 'sudo docker run --detach --volume="${PWD}":/etc/ansible/roles/role_under_test:ro ${run_opts} ${repository}:${version} "${init}" > "${container_id}"'
46+
- 'sudo docker run --detach --volume="${PWD}":/etc/ansible/roles/role_under_test:ro ${run_opts} geerlingguy/docker-${distro}-ansible:latest "${init}" > "${container_id}"'
5147

5248
# Ansible syntax check.
5349
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/${playbook} --syntax-check'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,4 @@ MIT / BSD
141141

142142
## Author Information
143143

144-
This role was created in 2014 by [Jeff Geerling](http://jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).
144+
This role was created in 2014 by [Jeff Geerling](http://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).

0 commit comments

Comments
 (0)