Revert test and add always_run to solve #20.

This commit is contained in:
Jeff Geerling 2015-01-09 23:46:28 -06:00
parent e5e6ece01a
commit 36d79e5f26
2 changed files with 1 additions and 7 deletions

View file

@ -30,12 +30,5 @@ script:
&& (echo 'Idempotence test: pass' && exit 0) && (echo 'Idempotence test: pass' && exit 0)
|| (echo 'Idempotence test: fail' && exit 1) || (echo 'Idempotence test: fail' && exit 1)
# Run the role/playbook a third time, in --check mode.
- >
ansible-playbook -i tests/inventory tests/$SITE --connection=local --check --sudo
| grep -q 'changed=0.*failed=0'
&& (echo 'Check mode: pass' && exit 0)
|| (echo 'Check mode: fail' && exit 1)
# Request a page via Apache, to make sure Apache is running and responds. # Request a page via Apache, to make sure Apache is running and responds.
- "curl http://localhost/" - "curl http://localhost/"

View file

@ -19,6 +19,7 @@
- name: Get installed version of Apache. - name: Get installed version of Apache.
command: "{{ apache_daemon }} -v" command: "{{ apache_daemon }} -v"
changed_when: false changed_when: false
always_run: yes
register: _apache_version register: _apache_version
- name: Create apache_version variable. - name: Create apache_version variable.