mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-16 10:13:26 +02:00
Update to 2022-08-02 11:00
This commit is contained in:
parent
a940a671f5
commit
f0969ea815
@ -38,6 +38,30 @@ nomad_base_conf:
|
|||||||
# read_only: False
|
# read_only: False
|
||||||
host_volumes: []
|
host_volumes: []
|
||||||
|
|
||||||
|
# An arbitrary string which can be used for job placement
|
||||||
|
# node_class: prod
|
||||||
|
|
||||||
|
# Resource reservation for the host to work properly
|
||||||
|
reserved:
|
||||||
|
# Unit is MHz
|
||||||
|
cpu: 200
|
||||||
|
# can be expressed as number, in which case it'll be the amount of RAM to reserve in MB
|
||||||
|
# or as a percentage, in which case it'll be a percentage of the total RAM
|
||||||
|
memory: 15%
|
||||||
|
# When memory is expressed as a percentage, you can set a minimum amount (in MB) which will be set
|
||||||
|
# if the percentage is less than that
|
||||||
|
memory_min: 500
|
||||||
|
# Unit is MB
|
||||||
|
disk: 500
|
||||||
|
# List of reserved ports which won't be allocated on tasks
|
||||||
|
reserved_ports: []
|
||||||
|
|
||||||
|
# Custom metadata to add in Nomad's conf
|
||||||
|
# meta:
|
||||||
|
# rack: 12-1
|
||||||
|
# cni: macvlan,ipvlan
|
||||||
|
meta: {}
|
||||||
|
|
||||||
# Server related settings
|
# Server related settings
|
||||||
server:
|
server:
|
||||||
# Should server be enabled
|
# Should server be enabled
|
||||||
@ -59,6 +83,7 @@ nomad_base_conf:
|
|||||||
# Consul and vault optional URL. This is just to add a shortcut in Nomad's UI
|
# Consul and vault optional URL. This is just to add a shortcut in Nomad's UI
|
||||||
# consul_ui: https://consul.example.org
|
# consul_ui: https://consul.example.org
|
||||||
# vault_ui: https://vault.example.org
|
# vault_ui: https://vault.example.org
|
||||||
|
|
||||||
# You can override part of the default config without rewriting everything else
|
# You can override part of the default config without rewriting everything else
|
||||||
# the dict will get merged
|
# the dict will get merged
|
||||||
nomad_extra_conf: {}
|
nomad_extra_conf: {}
|
||||||
|
@ -56,6 +56,24 @@ client {
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
}
|
}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
reserved {
|
||||||
|
cpu = {{ nomad_conf.client.reserved.cpu }}
|
||||||
|
memory = {{ (nomad_conf.client.reserved.memory is search('%$')) | ternary([((nomad_conf.client.reserved.memory | regex_replace('%$', '') | int) * ansible_memtotal_mb * 0.01), nomad_conf.client.reserved.memory_min] | max | int, nomad_conf.client.reserved.memory) }}
|
||||||
|
disk = {{ nomad_conf.client.reserved.disk }}
|
||||||
|
reserved_ports = "{{ nomad_conf.client.reserved.reserved_ports | join(',') }}"
|
||||||
|
}
|
||||||
|
|
||||||
|
meta {
|
||||||
|
{% for meta in nomad_conf.client.meta.keys() | list %}
|
||||||
|
{{ meta }} = "{{ nomad_conf.client.meta[meta] }}"
|
||||||
|
{% endfor %}
|
||||||
|
}
|
||||||
|
|
||||||
|
{% if nomad_conf.client.node_class is defined %}
|
||||||
|
node_class = "{{ nomad_conf.client.node_class }}"
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ui {
|
ui {
|
||||||
@ -71,3 +89,4 @@ ui {
|
|||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user