Skip to content

Instantly share code, notes, and snippets.

Created August 17, 2016 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/0bebe31564e03c0d215c8e1bb489043b to your computer and use it in GitHub Desktop.
Save anonymous/0bebe31564e03c0d215c8e1bb489043b to your computer and use it in GitHub Desktop.
agents = [ 1, 2, 3 ]
agents.each do |agent|
%w[ /var/lib/go-agent-#{agent} /var/log/go-agent-#{agent} ].each do |dir|
directory dir do
owner 'go'
group 'go'
mode '0755'
action :create
end
end
link "/etc/init.d/go-agent-#{agent}" do
to "/etc/init.d/go-agent"
link_type :symbolic
action :create
end
link "/usr/share/go-agent-#{agent}" do
to "/usr/share/go-agent"
link_type :symbolic
action :create
end
execute "copy go-agent config" do
command "cp /etc/default/go-agent /etc/default/go-agent-#{agent}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment