-
Notifications
You must be signed in to change notification settings - Fork 166
Open
Labels
Description
Was just trying to add the a capability to the Docker plugin (in my case, NET_ADMIN) and noticed that the generated client.hcl isn't accepted by Nomad on startup.
Given the Ansible YAML config of:
nomad_plugins:
docker:
config:
allow_caps: ["NET_ADMIN"]
The generated HCL is (that Nomad rejects):
plugin "docker" {
config {
allow_caps = ['net_admin']
}
}
Where I would have expected (and Nomad happily starts with):
plugin "docker" {
config {
allow_caps = ["NET_ADMIN"]
}
}
I also tried a list format for the YAML
nomad_plugins:
docker:
config:
allow_caps:
- "NET_ADMIN"
But it had the same output.
I presume the lowercase originates from
ansible-nomad/templates/client.hcl.j2
Line 74 in a1853f1
| {{ key | indent(count*width, first=True) }} = {% if value is string %}"{{ value }}"{% else %}{{ value | string | lower }}{% endif %} |