diff --git a/defaults/main.yml b/defaults/main.yml index 7849243..6cfe67c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -24,3 +24,4 @@ nomad_host_networks: nomad_allow_privileged: False nomad_plugins_podman: False nomad_docker_allow_caps: [] +nomad_client_network_interface: diff --git a/templates/config.hcl.j2 b/templates/config.hcl.j2 index 8f27c83..ab8713f 100644 --- a/templates/config.hcl.j2 +++ b/templates/config.hcl.j2 @@ -9,6 +9,9 @@ enabled = {{ nomad_server |lower }} client { enabled = true +{% if nomad_client_network_interface %} + network_interface = "{{ nomad_client_network_interface }}" +{% endif %} {% for nomad_host_volume in nomad_host_volumes %} host_volume "{{ nomad_host_volume['name'] }}" { path = "{{ nomad_host_volume['path'] }}"