I'm trying to run Ansible Playbook but it gives me the following error:
PLAY [test] *******************************************************************
GATHERING FACTS ***************************************************************
ok: [172.31.36.176]
TASK: [Check if Im sudo] ******************************************************
changed: [172.31.36.176]
TASK: [install packages] ******************************************************
failed: [172.31.36.176] => {"failed": true}
msg: this module requires key=value arguments (['name:apache2', 'update_cache=yes', 'state=latest'])
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
           to retry, use: --limit @/root/example.retry
172.31.36.176              : ok=2    changed=1    unreachable=0    failed=1
Playbook:
---
- hosts: test
  sudo: yes
  tasks:
    - name: Check if Im sudo
      command: echo $USER
    - name: install packages
      apt: name:apache2 update_cache=yes state=latest
      notify: start apache2
  handlers:
    - name: start apache2
      service: name=apache2 state=started