---
- hosts: all
  become: yes
  become_method: sudo
  gather_facts: no
  pre_tasks:
      - name: 'install python2'
        raw: sudo apt-get -y install python-simplejson
  tasks:
      - name: update apt cache
        apt: update_cache=yes

      - name: install packages
        apt: name={{ item }} state=present
        with_items:
            - g++
            - git
            - realpath
            - unzip

      - name: update QT_VERSION in .profile
        lineinfile: dest=/home/vagrant/.profile line="export QTRPI_QT_VERSION='{{ lookup('env', 'QTRPI_QT_VERSION') }}'"

      - name: update TARGET_DEVICE in .profile
        lineinfile: dest=/home/vagrant/.profile line="export QTRPI_TARGET_DEVICE='{{ lookup('env', 'QTRPI_TARGET_DEVICE') }}'"

      - name: update ssh working directory
        lineinfile: dest=/home/vagrant/.profile line="cd /vagrant"

---
- hosts: all
  become: yes
  become_method: sudo
  gather_facts: no
  pre_tasks:
      - name: 'install python2'
        raw: sudo apt-get -y install python-simplejson
  tasks:
      - name: update apt cache
        apt: update_cache=yes

      - name: install packages
        apt: name={{ item }} state=present
        with_items:
            - g++
            - git
            - realpath
            - unzip
            - zip

      - name: update QT_VERSION in .profile
        lineinfile: dest=/home/vagrant/.profile line="export QTRPI_QT_VERSION='{{ lookup('env', 'QTRPI_QT_VERSION') }}'"

      - name: update TARGET_DEVICE in .profile
        lineinfile: dest=/home/vagrant/.profile line="export QTRPI_TARGET_DEVICE='{{ lookup('env', 'QTRPI_TARGET_DEVICE') }}'"

      - name: update ssh working directory
        lineinfile: dest=/home/vagrant/.profile line="cd /vagrant"

Add missing zip package in ansible inventory
Add missing zip package in ansible inventory
