Adapt NodeJS installation tasks in Debian
This commit is contained in:
parent
89557bdadd
commit
4dd780504b
@ -38,31 +38,23 @@
|
|||||||
update_cache: true
|
update_cache: true
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Debian/Ubuntu | Installing NodeJS repository key (Ubuntu 14)
|
- name: Debian/Ubuntu | Installing NodeJS repository
|
||||||
become: true
|
become: true
|
||||||
shell: |
|
shell: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
|
curl -sL https://deb.nodesource.com/setup_8.x | bash -
|
||||||
args:
|
args:
|
||||||
warn: false
|
warn: false
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
|
||||||
- ansible_distribution == "Ubuntu"
|
|
||||||
- ansible_distribution_major_version | int == 14
|
|
||||||
|
|
||||||
- name: Debian/Ubuntu | Installing NodeJS repository key
|
- name: Debian/Ubuntu | Install NodeJS
|
||||||
apt_key:
|
apt:
|
||||||
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
|
name: "nodejs"
|
||||||
when:
|
|
||||||
- not (ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int == 14)
|
|
||||||
|
|
||||||
- name: Debian/Ubuntu | Add NodeSource repositories for Node.js
|
|
||||||
apt_repository:
|
|
||||||
repo: "deb https://deb.nodesource.com/node_6.x {{ ansible_distribution_release }} main"
|
|
||||||
state: present
|
state: present
|
||||||
update_cache: true
|
register: nodejs_package_is_installed
|
||||||
changed_when: false
|
until: nodejs_package_is_installed is succeeded
|
||||||
|
tags: init
|
||||||
|
|
||||||
- name: Debian/Ubuntu | Set Distribution CIS filename for Debian/Ubuntu
|
- name: Debian/Ubuntu | Set Distribution CIS filename for Debian/Ubuntu
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user