diff --git a/.travis.yml b/.travis.yml index 25cef97..84cdbda 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,21 @@ --- language: python python: "2.7" + env: - SITE=test.yml + before_install: - sudo apt-get update -qq - sudo apt-get install -y curl + install: + # Install Ansible. - pip install ansible==1.5.0 + + # Add ansible.cfg to pick up roles path. + - "printf '[defaults]\nroles_path = ../' > ansible.cfg" + script: # Check the role/playbook's syntax. - "ansible-playbook -i tests/inventory tests/$SITE --syntax-check" diff --git a/tests/test.yml b/tests/test.yml index e89cdca..854cb52 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -1,8 +1,5 @@ --- -- hosts: all - vars_files: - - '../vars/main.yml' - tasks: - - include: '../tasks/main.yml' - handlers: - - include: '../handlers/main.yml' +- hosts: localhost + remote_user: root + roles: + - ansible-role-apache