Clean up group names. Fix mineos
This commit is contained in:
25
roles/ansible-role-nodejs/tasks/setup-Debian.yml
Normal file
25
roles/ansible-role-nodejs/tasks/setup-Debian.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
- name: Ensure apt-transport-https is installed.
|
||||
apt: name=apt-transport-https state=present
|
||||
|
||||
- name: Add Nodesource apt key.
|
||||
apt_key:
|
||||
url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280
|
||||
id: "68576280"
|
||||
state: present
|
||||
|
||||
- name: Add NodeSource repositories for Node.js.
|
||||
apt_repository:
|
||||
repo: "{{ item }}"
|
||||
state: present
|
||||
with_items:
|
||||
- "deb https://deb.nodesource.com/node_{{ nodejs_version }} {{ ansible_distribution_release }} main"
|
||||
- "deb-src https://deb.nodesource.com/node_{{ nodejs_version }} {{ ansible_distribution_release }} main"
|
||||
register: node_repo
|
||||
|
||||
- name: Update apt cache if repo was added.
|
||||
apt: update_cache=yes
|
||||
when: node_repo.changed
|
||||
|
||||
- name: Ensure Node.js and npm are installed.
|
||||
apt: "name=nodejs={{ nodejs_version|regex_replace('x', '') }}* state=present"
|
||||
Reference in New Issue
Block a user