Created
August 17, 2016 09:39
-
-
Save anonymous/0bebe31564e03c0d215c8e1bb489043b to your computer and use it in GitHub Desktop.
This file contains 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
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