22 lines
575 B
YAML
22 lines
575 B
YAML
---
|
|
|
|
- name: get node source gpg url
|
|
get_url:
|
|
url: "{{ mastodon_nodejs_key_url }}"
|
|
dest: /tmp/nodesource.gpg.key
|
|
force: true
|
|
|
|
- name: gpg dearmor key
|
|
shell: "gpg --dearmor --yes -o {{ mastodon_nodejs_key_path }} /tmp/nodesource.gpg.key"
|
|
|
|
- name: node source repo
|
|
copy:
|
|
content: "deb [signed-by={{ mastodon_nodejs_key_path }}] https://deb.nodesource.com/node_16.x {{ ansible_facts['distribution_release'] }} main"
|
|
dest: /etc/apt/sources.list.d/nodesource.list
|
|
|
|
- name: install nodejs
|
|
apt:
|
|
name: nodejs
|
|
state: present
|
|
update_cache: true
|