forked from hpcloud-mon/ansible-kafka
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
31 lines (26 loc) · 1010 Bytes
/
.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
---
language: python
python: "2.7"
# Use following configuration to run ZooKeeper while executing tests
before_install:
# Add repository key
- "curl -s http://archive.cloudera.com/cdh4/ubuntu/precise/amd64/cdh/archive.key | sudo apt-key add -"
- "wget http://archive.cloudera.com/cdh4/one-click-install/precise/amd64/cdh4-repository_1.0_all.deb"
# Add Cloudera repository
- "sudo dpkg -i cdh4-repository_1.0_all.deb"
- "sudo apt-get update -qq"
# Install ZooKeeper
- "sudo apt-get install -y zookeeper-server"
before_script:
- "sudo service zookeeper-server init"
- "sudo service zookeeper-server start"
after_script:
- "sudo service zookeeper-server stop"
install:
# Install Ansible.
- pip install ansible
# Add ansible.cfg to pick up roles path.
- "{ echo '[defaults]'; echo 'roles_path = ../'; } >> ansible.cfg"
script:
- ansible-playbook -i tests/inventory tests/test.yml --syntax-check
- "ansible-playbook -i tests/inventory tests/test.yml --connection=local --sudo"