Deploy `/etc/nomad.d/server.hcl`.

This commit is contained in:
Kazuhiro MUSASHI 2021-06-19 19:53:38 +09:00
parent bd4f65dcf5
commit 531dde8bff
2 changed files with 8 additions and 6 deletions

View File

@ -1,4 +1,4 @@
server { server {
enabled = true enabled = true
bootstrap_expect = 3 bootstrap_expect = 1
} }

View File

@ -19,7 +19,8 @@ remote_file '/etc/nomad.d/datadir.hcl' do
end end
if node['nomad']['manager'] if node['nomad']['manager']
remote_file '/etc/nomad.d/server.hcl' do %w( server.hcl acl.hcl ).each do |conf|
remote_file "/etc/nomad.d/#{conf}" do
owner 'nomad' owner 'nomad'
group 'nomad' group 'nomad'
mode '664' mode '664'
@ -27,6 +28,7 @@ if node['nomad']['manager']
notifies :restart, 'service[nomad]' notifies :restart, 'service[nomad]'
end end
end end
end
if node['nomad']['client'] if node['nomad']['client']
%w( /etc/nomad.d/client.hcl /etc/nomad.d/docker-registry.hcl ).each do |conf| %w( /etc/nomad.d/client.hcl /etc/nomad.d/docker-registry.hcl ).each do |conf|