---
- hosts: all
  tasks:
    - name: Update package cache
      apt: update_cache=yes
    - name: Install NGINX
      apt: pkg=nginx
    - name: Disable default site
      file: path=/etc/nginx/sites-enabled/default state=absent
      notify:
        - restart nginx
    - name: Add Poleland site to available-sites
      copy: src=files/poleland dest=/etc/nginx/sites-available/poleland owner=root group=root mode=0644
    - name: Enable Poland site
      file: src=/etc/nginx/sites-available/poleland dest=/etc/nginx/sites-enabled/poleland owner=root group=root state=link
      notify:
        - restart nginx
    - name: Install Node.js
      shell: wget http://nodejs.org/dist/v0.10.24/node-v0.10.24-linux-x64.tar.gz -O - | tar -C /usr/local --strip-components 1 -xzf - creates=/usr/local/bin/node
    - name: Install grunt-cli
      npm: name=grunt-cli global=yes version=0.1.11
    - name: Install NPM dependencies
      npm: path=/vagrant
  handlers:
    - name: restart nginx
      service: name=nginx state=restarted
---
- hosts: all
  tasks:
    - name: Update package cache
      apt: update_cache=yes
    - name: Install NGINX
      apt: pkg=nginx
    - name: Disable default site
      file: path=/etc/nginx/sites-enabled/default state=absent
      notify:
        - restart nginx
    - name: Add Poleland site to available-sites
      copy: src=files/poleland dest=/etc/nginx/sites-available/poleland
              owner=root group=root mode=0644
    - name: Enable Poland site
      file: src=/etc/nginx/sites-available/poleland
              dest=/etc/nginx/sites-enabled/poleland owner=root group=root
              state=link
      notify:
        - restart nginx
    - name: Install Node.js
      shell: wget http://nodejs.org/dist/v0.10.24/node-v0.10.24-linux-x64.tar.gz -O - | tar -C /usr/local --strip-components 1 -xzf -
               creates=/usr/local/bin/node
    - name: Install grunt-cli
      npm: name=grunt-cli global=yes version=0.1.11
    - name: Install NPM dependencies
      npm: path=/vagrant
  handlers:
    - name: restart nginx
      service: name=nginx state=restarted
Split long Ansible task action lines
Split long Ansible task action lines
