|
|
@ -2,24 +2,19 @@ |
|
|
|
sudo: required |
|
|
|
sudo: required |
|
|
|
|
|
|
|
|
|
|
|
env: |
|
|
|
env: |
|
|
|
- repository: geerlingguy/docker-centos7-ansible |
|
|
|
- distro: centos7 |
|
|
|
version: latest |
|
|
|
|
|
|
|
init: /usr/lib/systemd/systemd |
|
|
|
init: /usr/lib/systemd/systemd |
|
|
|
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro" |
|
|
|
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro" |
|
|
|
- repository: geerlingguy/docker-centos6-ansible |
|
|
|
- distro: centos6 |
|
|
|
version: latest |
|
|
|
|
|
|
|
init: /sbin/init |
|
|
|
init: /sbin/init |
|
|
|
run_opts: "" |
|
|
|
run_opts: "" |
|
|
|
- repository: geerlingguy/docker-ubuntu1604-ansible |
|
|
|
- distro: ubuntu1604 |
|
|
|
version: latest |
|
|
|
|
|
|
|
init: /lib/systemd/systemd |
|
|
|
init: /lib/systemd/systemd |
|
|
|
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro" |
|
|
|
run_opts: "--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro" |
|
|
|
- repository: geerlingguy/docker-ubuntu1404-ansible |
|
|
|
- distro: ubuntu1404 |
|
|
|
version: latest |
|
|
|
|
|
|
|
init: /sbin/init |
|
|
|
init: /sbin/init |
|
|
|
run_opts: "" |
|
|
|
run_opts: "" |
|
|
|
- repository: geerlingguy/docker-ubuntu1204-ansible |
|
|
|
- distro: ubuntu1204 |
|
|
|
version: latest |
|
|
|
|
|
|
|
init: /sbin/init |
|
|
|
init: /sbin/init |
|
|
|
run_opts: "" |
|
|
|
run_opts: "" |
|
|
|
|
|
|
|
|
|
|
@ -28,12 +23,12 @@ services: |
|
|
|
|
|
|
|
|
|
|
|
before_install: |
|
|
|
before_install: |
|
|
|
# Pull container. |
|
|
|
# Pull container. |
|
|
|
- 'sudo docker pull ${repository}:${version}' |
|
|
|
- 'sudo docker pull geerlingguy/docker-${distro}-ansible:latest' |
|
|
|
|
|
|
|
|
|
|
|
script: |
|
|
|
script: |
|
|
|
- container_id=$(mktemp) |
|
|
|
- container_id=$(mktemp) |
|
|
|
# Run container in detached state. |
|
|
|
# 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. |
|
|
|
# Install dependencies. |
|
|
|
- 'sudo docker exec "$(cat ${container_id})" ansible-galaxy install -r /etc/ansible/roles/role_under_test/tests/requirements.yml' |
|
|
|
- 'sudo docker exec "$(cat ${container_id})" ansible-galaxy install -r /etc/ansible/roles/role_under_test/tests/requirements.yml' |
|
|
|