---
language: python
python: "2.7"

before_install:
  # Make sure everything's up to date.
  - sudo apt-get update -qq

install:
  # Install Ansible.
  - pip install ansible

  # Add ansible.cfg to pick up roles path.
  - "{ echo '[defaults]'; echo 'roles_path = ../'; } >> ansible.cfg"

script:
  # Check the role/playbook's syntax.
  - "ansible-playbook -i tests/inventory tests/test.yml --syntax-check"
  - "ansible-playbook -i tests/inventory tests/test.yml --connection=local --sudo"
  # Run the role/playbook again, checking to make sure it's idempotent.
  - >
    ansible-playbook -i tests/inventory tests/test.yml --connection=local --sudo
    | grep -q 'changed=0.*failed=0'
    && (echo 'Idempotence test: pass' && exit 0)
    || (echo 'Idempotence test: fail' && exit 1)
  - "test -e /opt/android/ndk"

---
language: python
python: "2.7"

before_install:
  # Make sure everything's up to date.
  - sudo apt-get update -qq

install:
  # Install Ansible.
  - pip install ansible
  - pip install ansible-lint

  # Add ansible.cfg to pick up roles path.
  - "{ echo '[defaults]'; echo 'roles_path = ../'; } >> ansible.cfg"

script:
  # Check the role/playbook's syntax.
  - "ansible-playbook -i tests/inventory tests/test.yml --syntax-check"
  - "ansible-playbook -i tests/inventory tests/test.yml --connection=local --sudo"
  # - "ansible-lint ."
  - "test -e /opt/android/ndk"

notifications:
  webhooks: https://galaxy.ansible.com/api/v1/notifications/

Remove idempotent test and add galaxy notification
Remove idempotent test and add galaxy notification
