- name: clone advanced project temaplate
  shell: composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-advanced /var/www/yii2-app-advanced creates=/var/www/yii2-app-advanced

- name: set Init run permissions
  file: path=/var/www/yii2-app-advanced/init mode=0744

- name: init project
  shell: yes | /var/www/yii2-app-advanced/init --env=Development

- name: set Local config with correct MySQL connection etc.
  template: "{{ item }} owner=vagrant mode=0644"
  with_items:
   - src=common-main-local.php dest=/var/www/yii2-app-advanced/common/config/main-local.php
   - src=frontend-main-local.php dest=/var/www/yii2-app-advanced/frontend/config/main-local.php
   - src=backend-main-local.php dest=/var/www/yii2-app-advanced/backend/config/main-local.php

- name: clone advanced project temaplate
  shell: composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-advanced /var/www/yii2-app-advanced creates=/var/www/yii2-app-advanced

- name: set Init run permissions
  file: path=/var/www/yii2-app-advanced/init mode=0744

- name: init project
  shell: yes | /var/www/yii2-app-advanced/init --env=Development

- name: set Local config with correct MySQL connection etc.
  template: "src={{item.src}} dest={{item.dest}} owner=vagrant mode=0644"
  with_items:
   - { src: 'common-main-local.php', dest: '/var/www/yii2-app-advanced/common/config/main-local.php' }
   - { src: 'frontend-main-local.php', dest: '/var/www/yii2-app-advanced/frontend/config/main-local.php' }
   - { src: 'backend-main-local.php', dest: '/var/www/yii2-app-advanced/backend/config/main-local.php' }

Fix "inserting new parameters" error (changed in ansible 1.6.7)
Fix "inserting new parameters" error (changed in ansible 1.6.7)

ansible does not allow inserting command parameters from a variable anymore, see:

ansible/ansible#8260
