use node role instead of task

This commit is contained in:
meaz 2024-04-23 19:13:36 +02:00
parent 87a32c4cc4
commit dde47b9967
Signed by: meaz
GPG Key ID: CD7A47B2F1ED43B4
5 changed files with 5 additions and 24 deletions

View File

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

View File

@ -9,6 +9,9 @@ You can deploy test instance using `Vagrantfile` attached to the role.
`ansible-playbook -b Playbooks/hubot.yml`
## 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.
## XMPP
Each new bot is created as a linux user with in its home path. It needs its own xmpp account.

View File

@ -3,9 +3,7 @@
#HUBOT DEFAULT VARIABLES
# used for hubot bots
hubot_nodejs_version: '14'
hubot_apt:
- nodejs
nodejs_version: '18'
hubot_list:
- hubot_name: myhubot1

View File

@ -1,18 +0,0 @@
---
- name: '[INSTALLDEPS] - Add Nodesource apt key.'
apt_key:
url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280
id: "68576280"
state: present
- name: '[INSTALLDEPS] - Add repository for nodejs'
apt_repository:
repo: deb https://deb.nodesource.com/node_{{ hubot_nodejs_version }}.x {{ ansible_distribution_release }} main
state: present
filename: 'nodesource'
- name: '[INSTALLDEPS] - Install dependencies'
apt:
name: "{{ hubot_apt }}"
update_cache: yes

View File

@ -3,9 +3,6 @@
- name: Add user
include_tasks: user.yml
- name: Install and configure npm and nodejs
include_tasks: installdeps.yml
- name: Generate hubot instance
include_tasks: createhubot.yml