6
6
- >
7
7
distribution=ubuntu-upstart
8
8
version=14.04
9
- - >
10
- distribution=ubuntu-upstart
11
- version=12.04
12
- - >
13
- distribution=debian
14
- version=7
9
+ # - >
10
+ # distribution=ubuntu-upstart
11
+ # version=12.04
12
+ # - >
13
+ # distribution=debian
14
+ # version=7
15
15
16
16
services :
17
17
- docker
@@ -20,22 +20,22 @@ before_install:
20
20
- sudo apt-get update
21
21
# Latest Ansible install
22
22
- sudo apt-add-repository -y ppa:ansible/ansible
23
- - sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/ansible-ansible-precise.list" \
24
- -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
23
+ - sudo apt-get update
25
24
- sudo apt-get install ansible python-pip -y
26
- - sudo pip install docker-py
25
+ - sudo pip install docker-py==1.5.0
27
26
# Pull docker image
28
- - docker pull ${distribution}:${version}
27
+ - sudo docker pull ${distribution}:${version}
28
+ - sudo ln -s ${PWD} /etc/ansible/roles/greendayonfire.mongodb
29
29
30
30
script :
31
- - ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1
31
+ - sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1
32
32
# Idempotence test
33
33
- >
34
- ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1
34
+ sudo ansible-playbook -i tests/hosts tests/site.yml -e target=mongo1
35
35
| grep -q 'changed=0.*failed=0'
36
36
&& (echo 'Idempotence test: pass' && exit 0)
37
37
|| (echo 'Idempotence test: fail' && exit 1)
38
38
39
39
# Delete all containers
40
- - docker kill mongo{1,2,3} && docker rm mongo{1,2,3}
40
+ - sudo docker kill mongo{1,2,3} && docker rm mongo{1,2,3}
41
41
0 commit comments