mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-04-16 10:13:26 +02:00
137 lines
4.7 KiB
YAML
137 lines
4.7 KiB
YAML
---
|
|
|
|
# Version of Nomad to install
|
|
nomad_version: 1.3.2
|
|
# URL of the archive
|
|
nomad_archive_url: https://releases.hashicorp.com/nomad/{{ nomad_version }}/nomad_{{ nomad_version }}_linux_amd64.zip
|
|
# Expected sha256 of the archive
|
|
nomad_archive_sha256: fc6b3800935c621633d98148ea30737ab8ac1f698020f45b28b07ac61fbf4a96
|
|
|
|
# List of plugins to install
|
|
nomad_plugins:
|
|
podman:
|
|
version: 0.4.0
|
|
archive_url: https://releases.hashicorp.com/nomad-driver-podman/0.4.0/nomad-driver-podman_0.4.0_linux_amd64.zip
|
|
sha256: f905f9c38db8cec1542b92f69233488d5bf94e30fe9a0fae9ac03b30c1e2cfea
|
|
|
|
# Root dir where Nomad will be installed
|
|
nomad_root_dir: /opt/nomad
|
|
|
|
# user under which nomad will run.
|
|
# Servers can run under an unprivileged user, while clients should run as root (or with equivalent privileges)
|
|
nomad_user: "{{ nomad_conf.client.enabled | ternary('root', 'nomad') }}"
|
|
|
|
# List of nomad servers (not clients !)
|
|
nomad_servers: []
|
|
|
|
# Nomad configuration
|
|
nomad_base_conf:
|
|
log_level: INFO
|
|
|
|
# You can define the datacenter in which this agent is running. The default value is dc1
|
|
# datacenter: dc1
|
|
|
|
# Node name, which should be uniq in the region. Default is the hostname
|
|
# name: nomade-fr-zone-c
|
|
|
|
# Client related settings
|
|
# The default is to act as a client if the hostname is not listed in nomad servers
|
|
client:
|
|
# Should client be enabled
|
|
enabled: "{{ (inventory_hostname in nomad_servers) | ternary(False, True) }}"
|
|
# host_volumes:
|
|
# - name: mysql
|
|
# path: /data/mysql
|
|
# read_only: False
|
|
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: {}
|
|
|
|
# List of enabled drivers, and their options.
|
|
task_drivers:
|
|
exec:
|
|
enabled: True
|
|
docker:
|
|
enabled: True
|
|
allow_privileged: True
|
|
raw_exec:
|
|
enabled: False
|
|
java:
|
|
enabled: False
|
|
qemu:
|
|
enabled: False
|
|
podman:
|
|
enabled: False # Note on EL8, it cannot be used with docker as there are package conflicts, see https://bugs.centos.org/view.php?id=16892
|
|
|
|
# Server related settings
|
|
server:
|
|
# Should server be enabled
|
|
# The default is to act as a server if the hostname is listed in nomad_servers
|
|
enabled: "{{ (inventory_hostname in nomad_servers) | ternary(True, False) }}"
|
|
# Expected number of servers to bootstrap the cluster. The default is to wait for all the servers
|
|
# listed in nomad_servers to be ready, and then to do the bootstrap
|
|
bootstrap_expect: "{{ nomad_servers | length }}"
|
|
# Encryption key to use to encrypt inter-server communications
|
|
# You can generate one with nomad operator keygen command. It must be the same
|
|
# on all the servers of the cluster. If not defined (the default), the trafic will
|
|
# not be encrypted
|
|
# encrypt: NVlG6VKgsTbMim041S5nbWmmaQKS7YchV+9G3XxcZDs=
|
|
|
|
# UI related settings
|
|
ui:
|
|
# Default is to enable the UI on server only
|
|
enabled: "{{ (inventory_hostname in nomad_servers) | ternary(True, False) }}"
|
|
# Consul and vault optional URL. This is just to add a shortcut in Nomad's UI
|
|
# consul_ui: https://consul.example.org
|
|
# vault_ui: https://vault.example.org
|
|
|
|
# You can override part of the default config without rewriting everything else
|
|
# the dict will get merged
|
|
nomad_extra_conf: {}
|
|
nomad_host_conf: {}
|
|
nomad_conf: "{{ nomad_base_conf | combine(nomad_extra_conf, recursive=True) | combine(nomad_host_conf, recursive=True) }}"
|
|
|
|
# Ports used by Nomad, the protocols, and the list of IP/CIDR for which the ports will be opened in the firewall
|
|
# You can also specify which address/port to advertise (not needed most of the time)
|
|
nomad_base_services:
|
|
http:
|
|
port: 4646
|
|
proto: [tcp]
|
|
src_ip: []
|
|
# advertise: 10.11.12.13:4347
|
|
rpc:
|
|
port: 4647
|
|
proto: [tcp]
|
|
src_ip: []
|
|
# advertise: y.y.y.y
|
|
serf:
|
|
port: 4648
|
|
proto: [tcp,udp]
|
|
src_ip: []
|
|
# advertise: x.x.x.x
|
|
nomad_extra_services: {}
|
|
nomad_host_services: {}
|
|
nomad_services: "{{ nomad_base_services | combine(nomad_extra_services, recursive=True) | combine(nomad_host_services, recursive=True) }}"
|