From 5c5a7017d2bd7fdd8cfd843f1c38ab10c73a8d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A2=D1=8E=D1=82=D1=80=D1=8E=D0=BC=D0=BE=D0=B2=20=D0=A1?= =?UTF-8?q?=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=9C=D0=B8=D1=85=D0=B0=D0=B9?= =?UTF-8?q?=D0=BB=D0=BE=D0=B2=D0=B8=D1=87?= Date: Thu, 18 Apr 2024 18:30:15 +0300 Subject: [PATCH] problem with npm --- sample-project | 1 + tsm_labs/tasks/main.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 160000 sample-project diff --git a/sample-project b/sample-project new file mode 160000 index 0000000..a5e1343 --- /dev/null +++ b/sample-project @@ -0,0 +1 @@ +Subproject commit a5e1343a53dcbcd40d82eea0858a32a51fbd279a diff --git a/tsm_labs/tasks/main.yml b/tsm_labs/tasks/main.yml index e34d27e..287697c 100644 --- a/tsm_labs/tasks/main.yml +++ b/tsm_labs/tasks/main.yml @@ -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 + + +