forked from AnsibleShipyard/ansible-marathon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (25 loc) · 1.02 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
language: python
python: "2.7"
env:
- SITE=playbook.yml
before_install:
- sudo apt-get update -qq
- sudo apt-get install curl -y
install:
- pip install -U ansible
# Add ansible.cfg to pick up roles path.
- "{ echo '[defaults]'; echo 'roles_path = ../'; } >> ansible.cfg"
# Install Mesosphere, marathon needs it
- sudo sh -c "echo 'deb http://repos.mesosphere.com/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) main' >> /etc/apt/sources.list.d/mesosphere.list"
- sudo apt-get update -qq
- sudo apt-get install mesos -y --force-yes
- sudo sh -c "echo 1 > /etc/zookeeper/conf/myid"
- sudo sh -c "echo 'server.1=localhost:2888:3888' >> /etc/zookeeper/conf/zoo.cfg"
- sudo service zookeeper restart
- sudo service mesos-master restart
script:
# Check the role/playbook's syntax.
- "ansible-playbook -i tests/inventory tests/$SITE --syntax-check"
# Run the role/playbook with ansible-playbook.
- "ansible-playbook -i tests/inventory tests/playbook.yml --connection=local --sudo"