mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2024-11-10 07:53:29 +01:00
CentOS build should mount cgroups and run privileged
This commit is contained in:
parent
1ac286c4dd
commit
b9d629ae98
1 changed files with 13 additions and 3 deletions
16
.travis.yml
16
.travis.yml
|
@ -1,7 +1,17 @@
|
|||
sudo: required
|
||||
env:
|
||||
- container_id=$(mktemp) distribution=centos version=7 init=/usr/lib/systemd/systemd
|
||||
- container_id=$(mktemp) distribution=ubuntu version=14.04 init=/sbin/init
|
||||
- >
|
||||
container_id=$(mktemp)
|
||||
distribution=centos
|
||||
version=7
|
||||
init=/usr/lib/systemd/systemd
|
||||
run_opts="--privileged --volume=/sys/fs/cgroup:/sys/fs/cgroup:ro"
|
||||
- >
|
||||
container_id=$(mktemp)
|
||||
distribution=ubuntu
|
||||
version=14.04
|
||||
init=/sbin/init
|
||||
run_opts=""
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
@ -19,7 +29,7 @@ script:
|
|||
#
|
||||
|
||||
# Run container in detached state
|
||||
- sudo docker run --detach ${distribution}:ansible "${init}" > "${container_id}"
|
||||
- sudo docker run --detach ${run_opts} ${distribution}:ansible "${init}" > "${container_id}"
|
||||
|
||||
# Syntax check
|
||||
- sudo docker exec "$(cat ${container_id})" ansible-playbook /etc/ansible/test.yml --syntax-check
|
||||
|
|
Loading…
Reference in a new issue