From 373fa29f606ae7345cd9671e41a7b481aab32f4d Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Wed, 31 Aug 2016 20:25:44 -0500 Subject: [PATCH] Adjust Travis file for easier maintenance. --- .travis.yml | 19 +++++++------------ README.md | 2 +- tests/test.yml | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 449c00e..a3f6bcf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,24 +2,19 @@ sudo: required env: - - repository: geerlingguy/docker-centos7-ansible - version: latest + - distro: centos7 init: /usr/lib/systemd/systemd run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro" - - repository: geerlingguy/docker-centos6-ansible - version: latest + - distro: centos6 init: /sbin/init run_opts: "" - - repository: geerlingguy/docker-ubuntu1604-ansible - version: latest + - distro: ubuntu1604 init: /lib/systemd/systemd run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro" - - repository: geerlingguy/docker-ubuntu1404-ansible - version: latest + - distro: ubuntu1404 init: /sbin/init run_opts: "" - - repository: geerlingguy/docker-ubuntu1204-ansible - version: latest + - distro: ubuntu1204 init: /sbin/init run_opts: "" @@ -28,12 +23,12 @@ services: before_install: # Pull container. - - 'sudo docker pull ${repository}:${version}' + - 'sudo docker pull geerlingguy/docker-${distro}-ansible:latest' script: - container_id=$(mktemp) # Run container in detached state. - - 'sudo docker run --detach --volume="${PWD}":/etc/ansible/roles/role_under_test:ro ${run_opts} ${repository}:${version} "${init}" > "${container_id}"' + - 'sudo docker run --detach --volume="${PWD}":/etc/ansible/roles/role_under_test:ro ${run_opts} geerlingguy/docker-${distro}-ansible:latest "${init}" > "${container_id}"' # Install dependencies. - 'sudo docker exec "$(cat ${container_id})" ansible-galaxy install -r /etc/ansible/roles/role_under_test/tests/requirements.yml' diff --git a/README.md b/README.md index 45f241c..1dd00f7 100644 --- a/README.md +++ b/README.md @@ -54,4 +54,4 @@ MIT / BSD ## Author Information -This role was created in 2016 by [Jeff Geerling](http://jeffgeerling.com/), author of [Ansible for DevOps](http://ansiblefordevops.com/). +This role was created in 2016 by [Jeff Geerling](http://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/). diff --git a/tests/test.yml b/tests/test.yml index 34a05df..12758d7 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -4,7 +4,7 @@ pre_tasks: - name: Update apt cache. apt: update_cache=yes - when: ansible_distribution == 'Ubuntu' + when: ansible_os_family == 'Debian' roles: - geerlingguy.git