File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change 6
6
# https://github.com/travis-ci/travis-ci/issues/6461#issuecomment-239577306
7
7
DOCKER_VERSION : " 1.9.1-0~trusty"
8
8
matrix :
9
- - repository : geerlingguy/docker-centos6-ansible
10
- version : latest
9
+ - distro : centos6
11
10
init : /sbin/init
12
11
run_opts : " "
13
12
playbook : test.yml
14
- - repository : geerlingguy/docker-centos7-ansible
15
- version : latest
13
+ - distro : centos7
16
14
init : /usr/lib/systemd/systemd
17
15
run_opts : " --privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
18
16
playbook : centos-7-test.yml
19
- - repository : geerlingguy/docker-ubuntu1604-ansible
20
- version : latest
17
+ - distro : ubuntu1604
21
18
init : /lib/systemd/systemd
22
19
run_opts : " --privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
23
20
playbook : test.yml
24
- - repository : geerlingguy/docker-ubuntu1404-ansible
25
- version : latest
21
+ - distro : ubuntu1404
26
22
init : /sbin/init
27
23
run_opts : " "
28
24
playbook : test.yml
29
- # - repository: geerlingguy/docker- ubuntu1204-ansible
25
+ # - distro: ubuntu1204
30
26
# version: latest
31
27
# init: /sbin/init
32
28
# run_opts: ""
@@ -42,12 +38,12 @@ before_install:
42
38
- sudo apt-get install docker-engine=$DOCKER_VERSION -yq --no-install-suggests --no-install-recommends --force-yes -o Dpkg::Options::="--force-confnew"
43
39
44
40
# Pull container
45
- - ' sudo docker pull ${repository}:${version} '
41
+ - ' sudo docker pull geerlingguy/docker-${distro}-ansible:latest '
46
42
47
43
script :
48
44
- container_id=$(mktemp)
49
45
# 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}"'
51
47
52
48
# Ansible syntax check.
53
49
- ' sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/${playbook} --syntax-check'
Original file line number Diff line number Diff line change @@ -141,4 +141,4 @@ MIT / BSD
141
141
142
142
## Author Information
143
143
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/ ) .
You can’t perform that action at this time.
0 commit comments