Skip to content

Commit

Permalink
Merge pull request gocd#71 from willejs/extra-opts
Browse files Browse the repository at this point in the history
added ability to add extra lines to init defaults file
  • Loading branch information
tomzo committed Feb 25, 2016
2 parents d8fb1cf + 687dd15 commit adba83d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
8 changes: 5 additions & 3 deletions attributes/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
default['gocd']['agent']['go_server_port'] = 8153
default['gocd']['agent']['daemon'] = true

default['gocd']['agent']['vnc']['enabled'] = false
default['gocd']['agent']['vnc']['enabled'] = false

default['gocd']['agent']['autoregister']['key'] = nil
default['gocd']['agent']['autoregister']['environments'] = %w()
default['gocd']['agent']['autoregister']['resources'] = %w()
default['gocd']['agent']['autoregister']['hostname'] = node['fqdn']

default['gocd']['agent']['server_search_query'] = "chef_environment:#{node.chef_environment} AND recipes:gocd\\:\\:server"
default['gocd']['agent']['workspace'] = nil # '/var/lib/go-agent' on linux
default['gocd']['agent']['count'] = 1
default['gocd']['agent']['workspace'] = nil # '/var/lib/go-agent' on linux
default['gocd']['agent']['count'] = 1
default['gocd']['agent']['default_extras'] = {}
1 change: 1 addition & 0 deletions attributes/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@

default['gocd']['server']['wait_up']['retry_delay'] = 10
default['gocd']['server']['wait_up']['retries'] = 10
default['gocd']['server']['default_extras'] = {}
3 changes: 3 additions & 0 deletions templates/default/go-agent-default.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ export JAVA_HOME=<%= node['java']['java_home'] %>
export AGENT_WORK_DIR=<%= @workspace %>
DAEMON=<%= @daemon ? 'Y' : 'N' %>
VNC=<%= @vnc ? 'Y' : 'N' %>
<% node['gocd']['agent']['default_extras'].each do |k, v| %>
<%= k %>="<%= v %>"
<% end %>
3 changes: 3 additions & 0 deletions templates/default/go-server-default.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ export JAVA_HOME=<%= node['java']['java_home'] %>

DAEMON=Y
ENABLE_PLUGINS=Y
<% node['gocd']['server']['default_extras'].each do |k, v| %>
<%= k %>="<%= v %>"
<% end %>

0 comments on commit adba83d

Please sign in to comment.