-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
52 lines (42 loc) · 1.23 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
language: python
cache:
apt: true
pip: true
directories:
- $TRAVIS_BUILD_DIR/venv
matrix:
include:
- os: linux
sudo: false
python: "2.7"
- os: osx
sudo: true
language: generic
# Use the new container infrastructure
sudo: false
# Install ansible
addons:
apt:
packages:
- python-pip
before install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install python2 ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then virtualenv venv -p python2; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source venv/bin/activate; fi
install:
# Install ansible
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo pip install ansible; fi
- if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then pip install ansible; fi
# Check ansible version
- ansible --version
# Create ansible.cfg with correct roles_path
- printf '[defaults]\nroles_path=../' >$HOME/.ansible.cfg
# install opsrole.ansible environment
- ansible-galaxy install opsroll.ansible
script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/