Skip to content

Commit

Permalink
nomad: add cpu_total_compute option
Browse files Browse the repository at this point in the history
  • Loading branch information
resmo committed Jun 24, 2024
1 parent 476f02e commit d4ea447
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/nomad/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ nomad__client_reserved_ports:
- "22"
- "8500-8600"

nomad__client_cpu_total_compute: null

# Host volumes
nomad__client_host_volume_basepath: "/mnt"
nomad__client_host_volumes: []
Expand Down
4 changes: 4 additions & 0 deletions roles/nomad/templates/client.hcl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ client {
reserved_ports = "{{ nomad__client_reserved_ports | join(',') }}"
}

{% if nomad__client_cpu_total_compute is not none %}
cpu_total_compute = {{ nomad__client_cpu_total_compute }}
{% endif %}

{% for host_network in nomad__client_host_networks %}
host_network "{{ host_network.name }}" {
cidr = "{{ host_network.cidr }}"
Expand Down

0 comments on commit d4ea447

Please sign in to comment.