Skip to content

Instantly share code, notes, and snippets.

@seeker815
Last active July 25, 2016 14:27
Show Gist options
  • Save seeker815/1b53dcd738a7c59ff0cc237a2dfd8ce9 to your computer and use it in GitHub Desktop.
Save seeker815/1b53dcd738a7c59ff0cc237a2dfd8ce9 to your computer and use it in GitHub Desktop.
repo = '%s-tools' % node['lsb']['codename']
apt_repository 'scalyr-agent-2' do
uri 'http://10.100.0.xx/repo/snapshots'
arch 'amd64'
distribution repo
components [repo]
key 'http://10.100.0.xx/repo/bjn.gpg'
end
package 'scalyr-agent-2' do
action :install
notifies :restart, 'service[scalyr-agent-2]'
end
file '/etc/scalyr-agent-2/version.json' do
content node['sai_scalyr']['url'] % {version: node['sai_scalyr']['version']}
end
file '/etc/scalyr-agent-2/agent.json' do
content node['sai_scalyr']['config']
end
service 'scalyr-agent-2' do
supports start:true, stop:true, restart:true
action [ :enable, :start]
end
default['sai_scalyr']['config'] = {
'api_key' => 'FIXME',
'logs' => [],
'monitors' => [],
}
default['sai_scalyr']['version'] = '1.2.5'
default['sai_scalyr']['url'] = 'http://bj.scalyr.com/%{version}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment