- include: debian-repo.yml
  when: ansible_distribution_release == 'wheezy'

- name: Install NodeJS packages
  apt: name={{ item }} state=latest cache_valid_time=3600 update_cache=true
  with_items:
    - nodejs
    - npm

- name: Install Bower, Gulp and Yeoman
  npm: name={{ item }} global=yes
  with_items:
    - bower
    - gulp
    - yo

- include: debian-repo.yml
  when: ansible_distribution_release == 'wheezy'

- name: Install NodeJS packages
  apt: name={{ item }} state=latest cache_valid_time=3600 update_cache=true
  with_items:
    - nodejs
    - npm

- name: Install nodejs-legacy package
  apt: name=nodejs-legacy state=latest cache_valid_time=3600 update_cache=true
  when: ansible_distribution_release == 'trusty'

- name: Install Bower, Gulp and Yeoman
  npm: name={{ item }} global=yes
  with_items:
    - bower
    - gulp
    - yo

Add nodejs-legacy installation for Ubuntu Trusty based machines
Add nodejs-legacy installation for Ubuntu Trusty based machines
