- hosts: all
  sudo: yes
  gather_facts: no
  pre_tasks:
      - raw: sudo apt-get -y update && sudo apt-get -y install python-simplejson
      - name: Gather facts
        setup:
  roles:
    - { role: firewall }
    - { role: geerlingguy.nodejs }
    - { role: letsencrypt, cert_contact_email: "{{ lookup('env','CERT_EMAIL') }}", cert_domain: "{{ lookup('env', 'DOMAIN') }}" }
    - { role: nginx, server_name: "{{ lookup('env', 'DOMAIN') }}", https_certs_dir: "/etc/letsencrypt/live/{{ lookup('env', 'DOMAIN') }}" }
    - { role: core-app, git_sha: "{{ lookup('env', 'APP_GIT_SHA') }}", database_url: "{{ lookup('env','DATABASE_URL') }}", session_secret:  "{{ lookup('env','SESSION_SECRET') }}"}

- hosts: all
  sudo: yes
  gather_facts: no
  pre_tasks:
      - raw: sudo apt-get -y update && sudo apt-get -y install python-simplejson
      - name: Gather facts
        setup:
  roles:
    - { role: firewall }
    - { role: geerlingguy.nodejs, nodejs_version: '6.x' }
    - { role: letsencrypt, cert_contact_email: "{{ lookup('env','CERT_EMAIL') }}", cert_domain: "{{ lookup('env', 'DOMAIN') }}" }
    - { role: nginx, server_name: "{{ lookup('env', 'DOMAIN') }}", https_certs_dir: "/etc/letsencrypt/live/{{ lookup('env', 'DOMAIN') }}" }
    - { role: core-app, git_sha: "{{ lookup('env', 'APP_GIT_SHA') }}", database_url: "{{ lookup('env','DATABASE_URL') }}", session_secret:  "{{ lookup('env','SESSION_SECRET') }}"}

Provision node v6 onto the EC2 instance
Provision node v6 onto the EC2 instance
