mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2025-01-03 00:30:18 +01:00
Update Travis to test the role itself (less setup work).
This commit is contained in:
parent
781c8cbfd8
commit
d2401eb840
2 changed files with 12 additions and 7 deletions
|
@ -1,13 +1,21 @@
|
||||||
---
|
---
|
||||||
language: python
|
language: python
|
||||||
python: "2.7"
|
python: "2.7"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- SITE=test.yml
|
- SITE=test.yml
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- sudo apt-get update -qq
|
- sudo apt-get update -qq
|
||||||
- sudo apt-get install -y curl
|
- sudo apt-get install -y curl
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
# Install Ansible.
|
||||||
- pip install ansible==1.5.0
|
- pip install ansible==1.5.0
|
||||||
|
|
||||||
|
# Add ansible.cfg to pick up roles path.
|
||||||
|
- "printf '[defaults]\nroles_path = ../' > ansible.cfg"
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Check the role/playbook's syntax.
|
# Check the role/playbook's syntax.
|
||||||
- "ansible-playbook -i tests/inventory tests/$SITE --syntax-check"
|
- "ansible-playbook -i tests/inventory tests/$SITE --syntax-check"
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
---
|
---
|
||||||
- hosts: all
|
- hosts: localhost
|
||||||
vars_files:
|
remote_user: root
|
||||||
- '../vars/main.yml'
|
roles:
|
||||||
tasks:
|
- ansible-role-apache
|
||||||
- include: '../tasks/main.yml'
|
|
||||||
handlers:
|
|
||||||
- include: '../handlers/main.yml'
|
|
||||||
|
|
Loading…
Reference in a new issue