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

This commit is contained in:
Kazuhiro MUSASHI 2024-04-06 16:44:55 +09:00
parent 885907310f
commit b91b44908b
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,23 @@
plugin "docker" {
config {
# extra Docker labels to be set by Nomad on each Docker container with the appropriate value
extra_labels = ["job_name", "task_group_name", "task_name", "namespace", "node_name"]
volumes {
enabled = true
}
allow_privileged = true
}
}
client {
host_volume "docker-sock" {
path = "/var/run/docker.sock"
}
host_volume "tmp" {
path = "/tmp"
}
}

View File

@ -49,6 +49,14 @@ if node['nomad']['client']
end
end
remote_file "/etc/nomad.d/options.hcl" do
mode "0644"
owner "nomad"
group "nomad"
notifies :restart, 'service[nomad]'
end
directory '/etc/nomad.d/jobs' do
owner 'nomad'
group 'nomad'