Skip to content

Commit

Permalink
Update for Node 4.
Browse files Browse the repository at this point in the history
- Update to Node 4.x
- Remove all scripts which do not have packaged versions
- Remove deprecated hubot-scripts.json functionality and variables
- Update documentation
  • Loading branch information
brianshumate committed Jul 28, 2016
1 parent 26ef9ed commit 4e17298
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 75 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,10 @@
- More granular admin user directory variables
- Become user fix
- Updated documentation

## v1.7.0

- Update to Node 4.x
- Remove all scripts which do not have packaged versions
- Remove deprecated hubot-scripts.json functionality and variables
- Update documentation
41 changes: 18 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ variables to `defaults.main.yml` file.
This role requires a Ubuntu or CentOS based Linux host; it's known to function
on Ubuntu and CentOS with the following software versions:

* Ansible: 1.9.4
* Ansible: 2.1.0.0
* Hubot: GitHub Master
* Node.js: 0.10.37
* Node.js: 4.4.7
* CentOS: 6
* Ubuntu: 14.04, 13.10, 13.04, 12.10, 12.04

Expand Down Expand Up @@ -70,7 +70,6 @@ All role variables should be in `defaults/main.yml`.
| `hubot_external_git_scripts` | list | External third-party Hubot scripts to clone from Git repositories |
| `hubot_custom_scripts` | list | Scripts to use from `files/scripts` directory |
| `hubot_git_scripts` | list | Scripts to clone from Git repositories |
| `hubot_scripts` | list | Base scripts included with Hubot to use |
| `epel_repo_gpg_key` | path | EPEL GPG key URL |
| `epel_repo_url` | URL | EPEL repository URL |

Expand All @@ -79,13 +78,25 @@ All role variables should be in `defaults/main.yml`.
The `hubot_node_packages` defines the following Node.js dependency packages:

* cheerio
* chrono-node
* clark
* cleverbot-node
* htmlparser
* hubot-ascii-art
* hubot-coin
* hubot-calculator
* hubot-hipchat-emoticons
* hubot-{{ hubot_adapter }}
* hubot-redis-brain
* hubot-scripts
* hubot-xkcd
* hubot-youtube
* lodash
* moment
* nodepie
* soupselect
* textspark

Note that newer Hubot scripts are now also node modules.

The `hubot_centos_os_packages` and `hubot_ubuntu_os_packages` variables
define OS packages required by Hubot; they should be fine as-is.
Expand All @@ -99,28 +110,12 @@ The `hubot_os_packages` defines following OS dependency packages:
* libexpat1-dev
* redis-server

The role requires most of the above packages; the `redis-server` package
is an dependency of the Hubot `redis-brain` script.
Redis required for redis brain functionality.

### Scripts

You can enable Hubot scripts by uncommenting or adding them to
the `hubot_scripts` variable.

The project includes a reasonable set of custom scripts befitting something
akin to an engineering team, but if you prefer, you can replace them with
your own list of scripts.

The optional commented out scripts in `defaults/main.yml`:

* github-status.coffee
* wunderground.coffee

You will need to uncomment the appropriate variables in `defaults/main.yml`
to make use of these scripts and add your own.

If you add more custom scripts be sure to add any Node.js dependencies
required by the scripts to the `hubot_node_packages` variable list as well.
You can enable more Hubot scripts by adding them to the
`hubot_node_packages` and `hubot_external_scripts` variables.

## Configuration

Expand Down
50 changes: 11 additions & 39 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ hubot_admin: vagrant

hubot_adapter: slack

hubot_node_version: 0.10.37
hubot_node_version: 4.4.7

hubot_admin_dir: "/home/{{ hubot_admin }}"

hubot_dir: "{{ hubot_admin_dir }}/hubot"

hubot_nvm_dir: "{{ hubot_admin_dir }}/.nvm"

hubot_node_dir: "{{ hubot_nvm_dir }}/v{{ hubot_node_version }}"
hubot_node_dir: "{{ hubot_nvm_dir }}/versions/node/v{{ hubot_node_version }}"

hubot_global_node_packages:
- coffee-script
Expand Down Expand Up @@ -78,13 +78,15 @@ hubot_description: "'A helpful chat robot'"
hubot_node_packages:
- cheerio
- chrono-node
- cleverbot-node
- clark
- htmlparser
- hubot-ascii-art
- hubot-coin
- hubot-calculator
- hubot-hipchat-emoticons
- hubot-{{ hubot_adapter }}
- hubot-redis-brain
- hubot-scripts
- hubot-xkcd
- hubot-youtube
- lodash
- moment
Expand All @@ -99,8 +101,12 @@ hubot_node_packages:
#############################################################################

hubot_external_scripts:
- hubot-redis-brain
- hubot-ascii-art
- hubot-coin
- hubot-help
- hubot-redis-brain
- hubot-xkcd
- hubot-youtube

#############################################################################
#
Expand All @@ -119,40 +125,6 @@ hubot_external_scripts:
#
#############################################################################

#############################################################################
#
# hubot_scripts: A list of additional Hubot scripts to use
#
#############################################################################

hubot_scripts:
- achievement_unlocked.coffee
- ackbar.coffee
- applause.coffee
- ascii.coffee
- base64.coffee
- bees.coffee
- botsnack.coffee
- cat.coffee
- cleverbot.coffee
- coin.coffee
- dealwithit.coffee
- decide.coffee
- fortune.coffee
- grumpycat.coffee
- hackernews.coffee
- megusta.coffee
- ping.coffee
- redis-brain
- reddit
- reddit-jokes.coffee
- reddit-random-top.coffee
- remind.coffee
- stallman.coffee
- twss
- xkcd.coffee
- zombies.coffee

# EPEL repository URL
epel_repo_url: "https://dl.fedoraproject.org/pub/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm"

Expand Down
12 changes: 0 additions & 12 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,6 @@
tags:
- hubot_scripts

- name: Configure Hubot scripts
become: True
become_user: "{{ hubot_admin }}"
template:
src: hubot-scripts.json.j2
dest: "{{ hubot_dir }}/hubot-scripts.json"
when: hubot_scripts is defined
notify:
- restart hubot
tags:
- hubot_scripts

- name: Configure Hubot external scripts
become: True
become_user: root
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.6.3
v1.7.0

0 comments on commit 4e17298

Please sign in to comment.