Deploy `/etc/consul.d/server.hcl` only when the consul is server.
This commit is contained in:
parent
b4189939f8
commit
63935ec789
|
@ -71,14 +71,16 @@ template '/etc/consul.d/consul.hcl' do
|
|||
end
|
||||
|
||||
# Deploy server specific config
|
||||
template '/etc/consul.d/server.hcl' do
|
||||
owner 'consul'
|
||||
group 'consul'
|
||||
mode '644'
|
||||
if node['consul']['manager']
|
||||
template '/etc/consul.d/server.hcl' do
|
||||
owner 'consul'
|
||||
group 'consul'
|
||||
mode '644'
|
||||
|
||||
variables(server_token: node['consul']['server_token'])
|
||||
variables(server_token: node['consul']['server_token'])
|
||||
|
||||
notifies :restart, 'service[consul]'
|
||||
notifies :restart, 'service[consul]'
|
||||
end
|
||||
end
|
||||
|
||||
%w( 01-bootstrap.sh 02-policy.sh ).each do |sh|
|
||||
|
|
Loading…
Reference in New Issue