Created
October 19, 2016 17:44
-
-
Save maplebed/814bff63a8aaa93c0b0048a9dc4099e5 to your computer and use it in GitHub Desktop.
Chef config snippet for installing honeytail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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