problem with npm

This commit is contained in:
2024-04-18 18:30:15 +03:00
parent b184647c54
commit 5c5a7017d2
2 changed files with 30 additions and 0 deletions
+1
Submodule sample-project added at a5e1343a53
+29
View File
@@ -34,3 +34,32 @@
group: root
mode: "0644"
notify: Reload nginx service
- name: Install NodeJS-18
when: "'node1' in inventory_hostname"
become: yes
block:
- name: Скачивание ключа
get_url:
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
dest: /tmp/nodesource.gpg.key
- name: Добавление открытого ключа от репозитория Node.js
apt_key:
file: /tmp/nodesource.gpg.key
- name: Добавление репозитория Node.js
apt_repository:
repo: "deb https://deb.nodesource.com/node_18.x {{ ansible_distribution_release }} main"
state: present
update_cache: yes
- name: Установка Node.js
ansible.builtin.apt:
package:
- nodejs
- name: Установка пакетов
npm:
path: /home/cloudadmin/ansible_openstack/sample-project/notes-app/
global: no
state: present