.travis.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. ---
  2. language: python
  3. python: "2.7"
  4. before_install:
  5. - sudo apt-get update -qq
  6. - sudo apt-get install -qq python-apt python-pycurl
  7. install:
  8. - pip install ansible
  9. - ansible --version
  10. script:
  11. - echo localhost > inventory
  12. - ansible-playbook -i inventory --syntax-check --list-tasks test.yml -e "role_name=ansible-role-nginx" -e "hosts_group=hosts_group"
  13. - ansible-playbook -i inventory --connection=local --sudo -vvvv test.yml -u root -e "role_name=ansible-role-nginx" -e "hosts_group=localhost"
  14. - >
  15. ansible-playbook -i inventory --connection=local --sudo -vvvv test.yml -u root -e "role_name=ansible-role-nginx" -e "hosts_group=localhost"
  16. | grep -q 'changed=0.*failed=0'
  17. && (echo 'Idempotence test: pass' && exit 0)
  18. || (echo 'Idempotence test: fail' && exit 1)
  19. - cat /etc/nginx/nginx.conf
  20. - cat /etc/nginx/sites-enabled/default.conf
  21. - cat /etc/nginx/sites-enabled/foo.conf
  22. - cat /etc/nginx/sites-enabled/bar.conf
  23. - cat /etc/nginx/conf.d/proxy.conf
  24. - cat /etc/nginx/conf.d/upstream.conf
  25. - cat /etc/nginx/conf.d/geo.conf
  26. - cat /etc/nginx/conf.d/gzip.conf
  27. - sudo cat /etc/nginx/auth_basic/demo
  28. - sudo nginx -t
  29. after_script:
  30. - ls /etc/nginx/auth_basic/
  31. - ls /etc/nginx/conf.d/
  32. - ls /etc/nginx/sites-enabled/