Skip to content

Commit a433d4e

Browse files
authored
Merge pull request #4 from stackhpc/travis
Add minimal travis config
2 parents 01f0974 + bb9d336 commit a433d4e

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

.travis.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
language: python
3+
python: "2.7"
4+
5+
# Use the new container infrastructure
6+
sudo: false
7+
8+
# Install ansible
9+
addons:
10+
apt:
11+
packages:
12+
- python-pip
13+
14+
install:
15+
# Install ansible
16+
- pip install ansible ansible-lint
17+
18+
# Check ansible version
19+
- ansible --version
20+
21+
# Create ansible.cfg with correct roles_path
22+
- printf '[defaults]\nroles_path=../' >ansible.cfg
23+
24+
# Compensate for repo name being different to the role
25+
- ln -s $(pwd) ../stackhpc.libvirt-host
26+
27+
script:
28+
# Run Ansible lint against the role
29+
- ansible-lint tasks/main.yml
30+
31+
# Basic role syntax check
32+
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
33+
34+
notifications:
35+
webhooks: https://galaxy.ansible.com/api/v1/notifications/

tests/inventory

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
localhost ansible_connection='local' ansible_python_interpreter='/usr/bin/env python'

tests/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
- hosts: all
3+
connection: local
4+
roles:
5+
- stackhpc.libvirt-host

0 commit comments

Comments
 (0)