Skip to content

Commit

Permalink
DRY out the site and inventory flags
Browse files Browse the repository at this point in the history
  • Loading branch information
nickjj committed Jun 22, 2014
1 parent 69c2737 commit 8aa75aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ language: "python"
python: "2.7"

env:
- SITE="test.yml"
- SITE_AND_INVENTORY="tests/test.yml -i tests/inventory"

before_install:
- "sudo apt-get update -qq"
Expand All @@ -13,10 +13,10 @@ install:
- "printf '[defaults]\nroles_path = ../' > ansible.cfg"

script:
- "ansible-playbook tests/$SITE -i tests/inventory --syntax-check"
- "ansible-playbook tests/$SITE -i tests/inventory --connection=local -vvvv"
- "ansible-playbook $SITE_AND_INVENTORY --syntax-check"
- "ansible-playbook $SITE_AND_INVENTORY --connection=local -vvvv"
- >
ansible-playbook tests/$SITE -i tests/inventory --connection=local
ansible-playbook $SITE_AND_INVENTORY --connection=local
| grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1)
Expand Down

0 comments on commit 8aa75aa

Please sign in to comment.