mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2024-12-22 19:10:19 +01:00
PR #60: Prepare to add Ubuntu 12.04.
This commit is contained in:
parent
379953325c
commit
49437eaeb4
4 changed files with 18 additions and 2 deletions
10
.travis.yml
10
.travis.yml
|
@ -7,6 +7,12 @@ env:
|
|||
version: 7
|
||||
init: /usr/lib/systemd/systemd
|
||||
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
|
||||
# Ubuntu 12.04.
|
||||
# - container_id: $(mktemp)
|
||||
# distribution: ubuntu
|
||||
# version: 12.04
|
||||
# init: /sbin/init
|
||||
# run_opts: ""
|
||||
# Ubuntu 14.04.
|
||||
- container_id: $(mktemp)
|
||||
distribution: ubuntu
|
||||
|
@ -22,11 +28,11 @@ before_install:
|
|||
# Pull container.
|
||||
- "sudo docker pull ${distribution}:${version}"
|
||||
# Customize container.
|
||||
- "sudo docker build --rm=true --file=tests/Dockerfile.${distribution} --tag=${distribution}:ansible tests"
|
||||
- "sudo docker build --rm=true --file=tests/Dockerfile.${distribution}.${version} --tag=${distribution}:${version}:ansible tests"
|
||||
|
||||
script:
|
||||
# Run container in detached state.
|
||||
- sudo docker run --detach --volume="${PWD}":/etc/ansible/roles/role_under_test:ro ${run_opts} ${distribution}:ansible "${init}" > "${container_id}"
|
||||
- 'sudo docker run --detach --volume="${PWD}":/etc/ansible/roles/role_under_test:ro ${run_opts} ${distribution}:${version}:ansible "${init}" > "${container_id}"'
|
||||
|
||||
# Ansible syntax check.
|
||||
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/test.yml --syntax-check'
|
||||
|
|
10
tests/Dockerfile.ubuntu.14.04
Normal file
10
tests/Dockerfile.ubuntu.14.04
Normal file
|
@ -0,0 +1,10 @@
|
|||
FROM ubuntu:14.04
|
||||
|
||||
# Install Ansible
|
||||
RUN apt-get install -y software-properties-common git
|
||||
RUN apt-add-repository -y ppa:ansible/ansible
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y ansible
|
||||
|
||||
# Install Ansible inventory file
|
||||
RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
|
Loading…
Reference in a new issue