Skip to content

Instantly share code, notes, and snippets.

Created February 20, 2013 15:35
  • Star 6 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save schisamo/46eafba27d43c4a1e026 to your computer and use it in GitHub Desktop.
name "opscode-hubot"
maintainer "Seth Chisamore"
maintainer_email ""
license "All rights reserved"
description "Installs/Configures opscode-hubot"
long_description, ''))
version "1.0.1"
depends "hubot", "~> 1.0.1"
depends "rsyslog"
# Cookbook Name:: opscode-hubot
# Recipe:: default
# Copyright (c) 2013, Opscode, Inc.
node.set['hubot']['version'] = "2.4.6"
node.set['hubot']['scripts_version'] = "2.4.1"
node.set['hubot']['install_dir'] = "/srv/hubot"
node.set['hubot']['adapter'] = "hipchat"
node.set['hubot']['dependencies'] = {
"hubot-hipchat" => ">= 2.4.5",
"node-stringprep" => "0.1.5"
node.set_unless['opscode-hubot']['hipchat_rooms'] = %w{
node.set['hubot']['hubot_scripts'] = %w{
node.set['hubot']['config'] = {
"HUBOT_HIPCHAT_JID" => node['opscode-hubot']['hipchat_jid'],
"HUBOT_HIPCHAT_PASSWORD" => node['opscode-hubot']['hipchat_password'],
"HUBOT_HIPCHAT_ROOMS" => node['opscode-hubot']['hipchat_rooms'].join(","),
# OS packages required by assorted Hubot scripts
%w{ libexpat1 libexpat1-dev libicu-dev }.each do |pkg|
package pkg do
action :install
include_recipe "hubot"
# Opscode custom Hubot scripts
remote_directory "#{node['hubot']['install_dir']}/scripts" do
source "scripts"
files_backup 0
files_owner node['hubot']['user']
files_group node['hubot']['group']
files_mode 00644
owner node['hubot']['user']
group node['hubot']['group']
overwrite true
mode 00755
notifies :restart, "service[hubot]", :delayed
include_recipe "rsyslog"
template '/etc/rsyslog.d/30-hubot.conf' do
source 'rsyslog.conf.erb'
owner 'root'
group 'root'
mode '644'
notifies :restart, 'service[rsyslog]'
template '/etc/logrotate.d/hubot' do
source 'logrotate.erb'
owner 'root'
group 'root'
mode '644'
Copy link

martinb3 commented Sep 3, 2014

@schisamo Any chance you would be willing to share your logrotate and rsyslog templates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment