---

- name: NodeJS | Add PPA key
  apt_key:
    id: "68576280"
    url: "https://deb.nodesource.com/gpgkey/nodesource.gpg.key"
  become: yes
  become_user: root

- name: NodeJS | Add PPA
  apt_repository:
    repo: "deb https://deb.nodesource.com/node_4.x {{ ansible_distribution_release }} main"
  become: yes
  become_user: root

- name: NodeJS | Install package
  apt:
    name: nodejs
  become: yes
  become_user: root

---

- name: NodeJS | Add PPA key
  command: "apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68576280"
  become: yes
  become_user: root

- name: NodeJS | Add PPA
  apt_repository:
    repo: "deb https://deb.nodesource.com/node_4.x {{ ansible_distribution_release }} main"
  become: yes
  become_user: root

- name: NodeJS | Install package
  apt:
    name: nodejs
  become: yes
  become_user: root

Use apt-key directly instead of Python due to SNI error
Use apt-key directly instead of Python due to SNI error
