Fix/npm
This commit is contained in:
+1
-8
@@ -1,13 +1,6 @@
|
||||
---
|
||||
- name: Update packages
|
||||
hosts: node
|
||||
become: yes
|
||||
become: true
|
||||
roles:
|
||||
- role: ./tsm_labs
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ sudo: false
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- python-pip
|
||||
- python-pip
|
||||
|
||||
install:
|
||||
# Install ansible
|
||||
@@ -26,4 +26,4 @@ script:
|
||||
- ansible-playbook tests/test.yml -i tests/inventory --syntax-check
|
||||
|
||||
notifications:
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||
|
||||
+21
-13
@@ -19,6 +19,13 @@
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Install EPEL repo
|
||||
when: ansible_os_family == 'RedHat'
|
||||
ansible.builtin.yum:
|
||||
name:
|
||||
- epel-release
|
||||
state: present
|
||||
|
||||
- name: Install nginx 'RedHat'
|
||||
when: ansible_os_family == 'RedHat'
|
||||
ansible.builtin.yum:
|
||||
@@ -37,29 +44,30 @@
|
||||
|
||||
- name: Install NodeJS-18
|
||||
when: "'node1' in inventory_hostname"
|
||||
become: yes
|
||||
become: true
|
||||
block:
|
||||
- name: Скачивание ключа
|
||||
get_url:
|
||||
ansible.builtin.get_url:
|
||||
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
|
||||
dest: /tmp/nodesource.gpg.key
|
||||
- name: Добавление открытого ключа от репозитория Node.js
|
||||
apt_key:
|
||||
ansible.builtin.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"
|
||||
ansible.builtin.apt_repository:
|
||||
repo: deb https://deb.nodesource.com/node_18.x {{ ansible_distribution_release }} main
|
||||
state: present
|
||||
update_cache: yes
|
||||
update_cache: true
|
||||
- name: Установка Node.js
|
||||
ansible.builtin.apt:
|
||||
package:
|
||||
- nodejs
|
||||
- name: Установка пакетов
|
||||
npm:
|
||||
path: /home/cloudadmin/ansible_openstack/sample-project/notes-app/
|
||||
global: no
|
||||
state: present
|
||||
|
||||
|
||||
- name: Копирование проекта
|
||||
ansible.builtin.git:
|
||||
repo: https://gitlab.resds.ru/itt/sample-project.git
|
||||
dest: /src/sample-project
|
||||
|
||||
- name: Установка пакетов
|
||||
community.general.npm:
|
||||
path: /src/sample-project/notes-app/
|
||||
state: present
|
||||
|
||||
Reference in New Issue
Block a user