Izveden refactor iz taskov v role
This commit is contained in:
parent
747438dedf
commit
a35460a57b
317 changed files with 2761 additions and 50 deletions
4
roles/nodejs/tasks/main.yml
Normal file
4
roles/nodejs/tasks/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
- import_tasks: main_win.yml
|
||||
when: ansible_connection == 'winrm'
|
||||
- import_tasks: main_lin.yml
|
||||
when: ansible_connection == 'ssh'
|
14
roles/nodejs/tasks/main_lin.yml
Normal file
14
roles/nodejs/tasks/main_lin.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
- name: Add NodeJS repo key
|
||||
apt_key:
|
||||
url: https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key
|
||||
keyring: /etc/apt/keyrings/nodesource.gpg
|
||||
|
||||
- name: Add NodeJS repo url
|
||||
apt_repository:
|
||||
repo: "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main"
|
||||
|
||||
- name: Install NodeJS
|
||||
apt:
|
||||
name: nodejs
|
||||
state: latest
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue