Skip to content

Commit

Permalink
extra params using node object as base
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Fode committed Nov 6, 2014
1 parent 4579c6b commit 03d210c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,15 @@ Installs and configures [Consul][1].
</td>
<td><tt>nil</tt></td>
</tr>
<tr>
<td><tt>['consul']['extra_params']</tt></td>
<td>hash</td>
<td>
Pass a hash of extra params to the default.json config file
</td>
<td><tt>{}</tt></td>
</tr>

</table>

### Consul UI Attributes
Expand Down
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@
default['consul']['client_addr'] = '0.0.0.0'
default['consul']['ui_dir'] = '/var/lib/consul/ui'
default['consul']['serve_ui'] = false
default['consul']['extra_params'] = {}
2 changes: 1 addition & 1 deletion recipes/_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
end

# Determine service params
service_config = {}
service_config = JSON.parse(node['consul']['extra_params'].to_json)
service_config['data_dir'] = node['consul']['data_dir']
num_cluster = node['consul']['bootstrap_expect'].to_i

Expand Down

0 comments on commit 03d210c

Please sign in to comment.