---
language: python
python: "2.7"
sudo: required
dist: trusty

env:
  - SITE=test.yml

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

install:
  # Install Ansible.
  - pip install ansible
  - echo "localhost" > inventory
  - ansible-galaxy install -r requirements.yml

script:
  # Check the role/playbook's syntax.
  - "ansible-playbook -i inventory $SITE --syntax-check"

  # Run the role/playbook with ansible-playbook.
  - "ansible-playbook -i inventory $SITE --connection=local --sudo --skip-tags bika-apt"

---
language: python
python: "2.7"
sudo: required
dist: trusty

env:
  - SITE=test.yml

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

install:
  # Install Ansible.
  - pip install ansible
  - echo "localhost" > inventory
  - ansible-galaxy install -r requirements.yml

script:
  # Check the role/playbook's syntax.
  - "ansible-playbook -i inventory $SITE --syntax-check"

  # Run the role/playbook with ansible-playbook.
  - "ansible-playbook -i inventory $SITE --connection=local --become --skip-tags bika-apt"

Use become instead of sudo
Use become instead of sudo
