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