use node role instead of task #3
5 changed files with 5 additions and 24 deletions
|
@ -2,4 +2,5 @@
|
|||
|
||||
- hosts: hubot
|
||||
roles:
|
||||
- node
|
||||
- hubot
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue