replace node task by node role

This commit is contained in:
meaz 2024-04-23 19:22:17 +02:00
parent b73116e859
commit 24bb2d2c6c
Signed by: meaz
GPG Key ID: CD7A47B2F1ED43B4
4 changed files with 6 additions and 20 deletions

View File

@ -2,4 +2,5 @@
- hosts: kuma
roles:
- node
- kuma

View File

@ -12,6 +12,9 @@ Then you can then access forgejo from your computer on `http://192.168.33.44:300
The first user you create becomes the admin.
## Playbook
The playbook includes node role and deploys entire stack needed to run hubot. Additional role is also available in the Ansible roles repos in git.
## Tags
You can use tags when you deploy:

View File

@ -1,6 +1,7 @@
---
#node
nodejs_version: '16'
nodejs_version: '18'
#User
kuma_username: 'kuma'
@ -9,7 +10,4 @@ kuma_homedir: '/opt/kuma'
kuma_app_dir: '{{ kuma_homedir }}/app'
kuma_version: '1.23.11'
kuma_pkg:
- nodejs
kuma_node_version: '18'
kuma_pm2_binpath: '/usr/bin/pm2'

View File

@ -1,21 +1,5 @@
---
- name: "[INSTALLDEPS] - Add nodejs apt key"
apt_key:
url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key
state: present
- name: "[INSTALLDEPS] - Add nodejs source"
apt_repository:
repo: "deb https://deb.nodesource.com/node_{{ kuma_node_version }}.x {{ ansible_distribution_release }} main"
update_cache: yes
- name: "[INSTALLDEPS] - Install Dependencies"
apt:
name: "{{ kuma_pkg }}"
update_cache: yes
state: latest
- name: '[INSTALLDEPS] - Install PM2'
npm:
name: 'pm2'