title: Ansible playbook syntax error in task name field
body: <p>Here it is:</p>
  
  <pre><code>- hosts: ppe32
    tasks:
    - name: update apt cache
      apt:
        update_cache=yes
  
    - name: make sure aide is installed and latest
      apt:
        name=aide
        state=latest
  
    - name: make sure fail2ban is installed and latest
      apt:
        name=fail2ban
        state=latest
  
    - name: make sure iptables-persistent is installed and latest
      apt:
        name=iptables-persistent
        state=latest
  
    - name: make sure python-pyopenssl is installed and latest
      apt:
        name=python-pyopenssl
        state=latest
  
    - name: generate private key
      openssl_privatekey:
        path=/etc/ssl/certs/privkey.pem
        state=present
  
    - name: generate csr
      openssl_csr:
        common_name={{ inventory_hostname }}
        country_name=fr
        path=/etc/ssl/certs/ansible.csr
        privatekey_path=/etc/ssl/certs/privkey.pem
  
    - name: generate certificate
      openssl_certificate:
        csr_path=/etc/ssl/certs/ansible.csr
        state=present
        has_expired=no
        path=/etc/ssl/certs/cert.crt
        subject={{ inventory_hostname }}
  
    - name: insert fail2ban conf
      template:
        src=jail.j2
        dest=/etc/fail2ban/jail.d/ssh.conf
      notify:
      - restart fail2ban
  
    - name: insert iptables-persistent conf
      template:
        src=iptables.j2
        dest=/etc/iptables/rules.v4
      notify:
      - restart iptables-persistent
  
    handlers:
    - name: restart fail2ban
      service:
        name=fail2ban
        state=restarted
  
    - name: restart iptables-persistent
      service:
        name=iptables-persistent
        state=restarted
  </code></pre>
  
  <p>Please keep in mind this is a work in progress, I'm just trying to solve this error when running "ansible-playbook playbook.yml -i hosts --check":</p>
  
  <blockquote>
    <p>ERROR! no action detected in task. This often indicates a misspelled
    module name, or incorrect module path.</p>
    
    <p>The error appears to have been in '/root/web-sec.yml': line 27, column
    5, but may be elsewhere in the file depending on the exact syntax
    problem.</p>
    
    <p>The offending line appears to be:</p>
    
    <ul>
    <li>name: generate private key
    ^ here</li>
    </ul>
    
    <p>The error appears to have been in '/root/web-sec.yml': line 27, column
    5, but may be elsewhere in the file depending on the exact syntax
    problem.</p>
    
    <p>The offending line appears to be:</p>
    
    <ul>
    <li>name: generate private key
    ^ here</li>
    </ul>
  </blockquote>