Ansible role for creating and managing a Hubot powered chat robot.
ansible-apt
ansible-nodejs
ansible-runit
See defaults/main.yml
for default values.
These variables are used for setting up and deploying Hubot, such as specifying specific packages to be installed. These are less likely to require changes or overrides.
Variable | Type | Description |
---|---|---|
hubot_apt_pkg | List | List of apt packages to be installed |
hubot_npm_pkg | List | List of npm packages to be installed |
These variables are used for creating and configurating a unique Hubot-powered robot, and are more likely be customized.
Variable | Type | Description |
---|---|---|
robot_name | String | Name of your robot |
robot_author | String | Author/maintainer of the robot |
robot_desc | String | Desciption of the robot |
robot_user | String | User account to run the robot as |
robot_dir | String | Directory to create robot in |
robot_env_dir | String | Directory to write config as env vars |
robot_adapter | String | Hubot adapter used by the robot |
robot_scripts | List | Hubot scripts to be installed via npm |
robot_env | Dict | Key/value config pairs to be exported to env |
This role uses runit
and a corresponding role) to manage the Hubot process. The run
and log
scripts used by runit are defined here as variables.
Variable | Type | Description |
---|---|---|
runit_service | Nested Dict | A list with a nested dictionary containing the contents of run_script and log_script |
A Makefile is included to test this role via Vagrant, using the included Vagrantfile and ansible-galaxy
requirements.yml
file to resolve any external dependencies.
External role dependencies are copied into the Vagrant Ansible provisioner directory (.vagrant/provisioners/ansible/roles
) which is specified in theansible.cfg
file as a roles_path
.
make all
to resolve dependencies and bring up a test VMmake clean
to destroy the test VM and remove external dependencies once finished testing
Add to your playbook as a role include:
---
- hosts: all
roles:
- role: ansible-hubot
- Source hosted at GitHub
- Report issues/questions/feature requests on GitHub Issues
Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:
- Fork the repo
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Created and maintained by Chris Spicer (github@cspicer.ca).
MIT License (see LICENSE)