Try shell for apt
service: name=apache2 state=restarted
tasks:
- #- name: Update apt-get cache
- # apt: update_cache=yes
+ - name: Update apt-get cache
+ shell: "apt-get update"
- name: Install system-wide packages (not Travis)
when: mode != "travis"
