summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml5
-rw-r--r--tasks/main.yml13
-rwxr-xr-xtests/test.sh5
3 files changed, 6 insertions, 17 deletions
diff --git a/.travis.yml b/.travis.yml
index 5ea940f..1f2c376 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,10 +7,7 @@ env:
- distro: ubuntu1604
- distro: ubuntu1404
- distro: ubuntu1204
-
-before_install:
- # Pull container.
- - 'docker pull geerlingguy/docker-${distro}-ansible:latest'
+ - distro: debian8
script:
# Run tests.
diff --git a/tasks/main.yml b/tasks/main.yml
index b0379a2..c5a4d7f 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -17,17 +17,8 @@
force: yes
when: ansible_os_family == 'Debian'
-- name: Install NTP (RedHat).
- yum: name=ntp state=installed
- when: ansible_os_family == 'RedHat'
-
-- name: Install NTP (Debian).
- apt: name=ntp state=installed
- when: ansible_os_family == 'Debian'
-
-- name: Install NTP (FreeBSD).
- pkgng: name=ntp state=present
- when: ansible_os_family == 'FreeBSD'
+- name: Install NTP.
+ package: name=ntp state=present
- name: Ensure NTP is running and enabled as configured.
service:
diff --git a/tests/test.sh b/tests/test.sh
index 5bc169b..e625951 100755
--- a/tests/test.sh
+++ b/tests/test.sh
@@ -53,8 +53,9 @@ fi
container_id=$(mktemp)
# Run the container using the supplied OS.
-printf ${green}"Pulling Docker container: geerlingguy/docker-$distro-ansible."${neutral}"\n"
-docker run --detach --volume="$PWD":/etc/ansible/roles/role_under_test:rw $run_opts geerlingguy/docker-$distro-ansible:latest "$init" > "$container_id"
+printf ${green}"Starting Docker container: geerlingguy/docker-$distro-ansible."${neutral}"\n"
+docker pull geerlingguy/docker-$distro-ansible:latest
+docker run --detach --volume="$PWD":/etc/ansible/roles/role_under_test:rw $opts geerlingguy/docker-$distro-ansible:latest $init > "$container_id"
container_id=$(cat $container_id)