Add tests

This commit is contained in:
Matt Willsher 2015-01-12 21:01:08 +00:00
parent 68c31fe08e
commit e06669fb65
3 changed files with 28 additions and 0 deletions

21
.travis.yml Normal file
View file

@ -0,0 +1,21 @@
---
language: python
python: "2.7"
before_install:
# Make sure everything's up to date.
- sudo apt-get update -qq
install:
# Install Ansible.
- pip install ansible
# Add ansible.cfg to pick up roles path.
- "printf '[defaults]\nroles_path = ../' > ansible.cfg"
script:
# Check the roles syntax
- "ansible-playbook -i tests/inventory tests/test.yml --syntax-check"
- "ansible-playbook -i tests/inventory tests/test.yml --connection=local --sudo"

1
tests/inventory Normal file
View file

@ -0,0 +1 @@
localhost

6
tests/test.yml Normal file
View file

@ -0,0 +1,6 @@
---
hosts: localhost
remote_user: root
roles:
- ansible-sshd