title: Simple ansible playbook syntax error (YAML)
body: <p>I've just started ansible and have created a simple playbook to deploy nginx on a target server. The YAML playbook file (myplaybook.yml) looks like this:-</p>
  
  <pre><code>- name: Configure webserver with nginx
    hosts: webservers
    sudo: True
    tasks:
      - name: install nginx
      - apt: name=nginx update_cache=yes
         environment:
            http_proxy: myproxy.com:8088
            https_proxy: myproxy.com:8088
  </code></pre>
  
  <p>When I execute:-</p>
  
  <p>$ ansible-playbook myplaybook.yml</p>
  
  <p>I get:-</p>
  
  <p>ERROR: Syntax Error while loading YAML script, nginx-ansible.yml
  Note: The error may actually appear before this position: line 7, column 23</p>
  
  <pre><code>- apt: name=nginx update_cache=yes
         environment:
                    ^
  </code></pre>
  
  <p>I don't see why this error occurs - the hosts file contains the [webservers] section OK - can anyone help?</p>
  
  <p>Thanks!</p>