Change --sudo to --become since --sudo has been deprecated.

This commit is contained in:
Ismandra Eka Nugraha 2018-04-13 15:57:56 +07:00
parent 9555ab9559
commit e5317544dd

View File

@ -19,10 +19,10 @@ script:
# Basic role syntax check
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
# Run the role with ansible-playbook.
- ansible-playbook tests/test.yml -i tests/inventory --connection=local --sudo
- ansible-playbook tests/test.yml -i tests/inventory --connection=local --become
# Run the role again, checking to make sure it's idempotent.
- >
ansible-playbook tests/test.yml -i tests/inventory --connection=local --sudo | grep -q 'changed=0.*failed=0'
ansible-playbook tests/test.yml -i tests/inventory --connection=local --become | grep -q 'changed=0.*failed=0'
&& (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1)
# Request a page via the web server, to make sure NGINX is running and responds.
- curl http://localhost/