Skip to content

Commit fbb164e

Browse files
committed
Updated travis test integration to use role directly.
1 parent 22a7a98 commit fbb164e

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
---
22
language: python
33
python: "2.7"
4+
45
env:
56
- SITE=test.yml
7+
68
before_install:
79
- sudo apt-get update -qq
10+
811
install:
12+
# Install Ansible.
913
- pip install ansible==1.5.0
14+
15+
# Add ansible.cfg to pick up roles path.
16+
- "printf '[defaults]\nroles_path = ../' > ansible.cfg"
17+
1018
script:
1119
# Check the role/playbook's syntax.
1220
- "ansible-playbook -i tests/inventory tests/$SITE --syntax-check"

tests/test.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
---
2-
- hosts: all
3-
vars_files:
4-
- '../vars/main.yml'
5-
tasks:
6-
- include: '../tasks/main.yml'
7-
handlers:
8-
- include: '../handlers/main.yml'
2+
- hosts: localhost
3+
remote_user: root
4+
roles:
5+
- ansible-role-mysql

0 commit comments

Comments
 (0)