--- language: python python: "2.7" before_install: - sudo apt-get update -qq - sudo apt-get install -qq python-apt python-pycurl install: - pip install ansible - ansible --version script: - echo localhost > inventory - ansible-playbook -i inventory --syntax-check --list-tasks test.yml -e "role_name=ansible-role-nginx" -e "hosts_group=hosts_group" - ansible-playbook -i inventory --connection=local --sudo -vvvv test.yml -u root -e "role_name=ansible-role-nginx" -e "hosts_group=localhost" - > ansible-playbook -i inventory --connection=local --sudo -vvvv test.yml -u root -e "role_name=ansible-role-nginx" -e "hosts_group=localhost" | grep -q 'changed=0.*failed=0' && (echo 'Idempotence test: pass' && exit 0) || (echo 'Idempotence test: fail' && exit 1) - cat /etc/nginx/nginx.conf - cat /etc/nginx/sites-enabled/default.conf - cat /etc/nginx/sites-enabled/foo.conf - cat /etc/nginx/sites-enabled/bar.conf - cat /etc/nginx/conf.d/proxy.conf - cat /etc/nginx/conf.d/upstream.conf - cat /etc/nginx/conf.d/geo.conf - cat /etc/nginx/conf.d/gzip.conf - sudo cat /etc/nginx/auth_basic/demo - sudo nginx -t after_script: - ls /etc/nginx/auth_basic/ - ls /etc/nginx/conf.d/ - ls /etc/nginx/sites-enabled/