This commit is contained in:
2024-04-22 19:29:56 +00:00
committed by tiutriumov.sm
parent 5c5a7017d2
commit 236c200d4e
3 changed files with 24 additions and 23 deletions
+1 -8
View File
@@ -1,13 +1,6 @@
---
- name: Update packages
hosts: node
become: yes
become: true
roles:
- role: ./tsm_labs
+2 -2
View File
@@ -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
View File
@@ -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