Skip to content

Instantly share code, notes, and snippets.

@maplebed
Created October 19, 2016 17:44
Show Gist options
  • Save maplebed/814bff63a8aaa93c0b0048a9dc4099e5 to your computer and use it in GitHub Desktop.
Save maplebed/814bff63a8aaa93c0b0048a9dc4099e5 to your computer and use it in GitHub Desktop.
Chef config snippet for installing honeytail
# write the binary to the datestamped location so the not_if works
# to prevent re-downloading the bin every chef run
remote_file "/srv/infra/bin/#{node['honeytail']['version']}" do
source "#{node['honeytail']['URL']}"
owner 'ubuntu'
group 'ubuntu'
mode '0755'
action :create
not_if do
File.exist?("/srv/infra/bin/#{node['honeytail']['version']}")
end
end
# symlink it in to place
link "/srv/infra/bin/honeytail" do
to "/srv/infra/bin/#{node['honeytail']['version']}"
end
# drop our writekey in a file for easy management
# TODO put this in an encrypted databag instead
file '/srv/infra/tmp/dogfood_writekey' do
content "#{node['honeytail']['writekey']}\n"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment