title: installing package using loop in ansible
body: <p>I need to use with_items loop to install apache2, sqlite3, and git in Ansible. I'm trying to use the below code but it seems like nothing is happening.</p>
  
  <pre><code>---
  - hosts: all
    sudo: yes
    name: install apache2, sqlite3, git on remote server
    tasks:
    - name: Install list of packages
      action: apt pkg={{item}} state=installed
      with_items:
        - apache2
        - sqlite3
        - git
  </code></pre>