mirror of
https://github.com/willshersystems/ansible-sshd
synced 2024-11-22 02:50:18 +01:00
Add tests
This commit is contained in:
parent
68c31fe08e
commit
e06669fb65
3 changed files with 28 additions and 0 deletions
21
.travis.yml
Normal file
21
.travis.yml
Normal 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
1
tests/inventory
Normal file
|
@ -0,0 +1 @@
|
||||||
|
localhost
|
6
tests/test.yml
Normal file
6
tests/test.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
hosts: localhost
|
||||||
|
remote_user: root
|
||||||
|
roles:
|
||||||
|
- ansible-sshd
|
||||||
|
|
Loading…
Reference in a new issue