create a playbook test.yml that will install apache2 sqlite3 git ?? : ---
- name: install apache2, sqlite3, git pn remote server
  hosts: host01
  sudo: yes
  tasks:
  - name: Install list of packages
     action: apt pkg={{item}} state=installed
     with_items:
          - apache2
          - sqlite3
          - git


INVENTORY FILE NAME: myhosts

$cat myhosts

[group1]
host01 ansible_ssh_user=ubuntu


COMMAND USED: ansible-playbook -i myhosts test.yml


ERROR is below one, I don't know what went wrong someone help me in this.

ERROR: Syntax Error while loading YAML script, test.yml
Note: The error may actually appear before this position: line 7, column 12

  - name: Install list of packages
     action: apt pkg={{item}} state=installed
           ^
We could be wrong, but this one looks like it might be an issue with
missing quotes.  Always quote template expression brackets when they
start a value. For instance:

    with_items:
      - {{ foo }}

Should be written as:

    with_items:
      - "{{ foo }}"
