aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup/ansible/roles/nomad/defaults/main.yaml
blob: ad8b36ee66c4f6dbab39bb503404e5b87b0063f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
# file: roles/nomad/defaults/main.yaml

# Inst - Prerequisites.
packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"

packages_base:
  - "cgroup-bin"
  - "curl"
  - "git"
  - "libcgroup1"
  - "unzip"
packages_by_distro:
  ubuntu:
    - []
packages_by_arch:
  aarch64:
    - []
  x86_64:
    - []

# Inst - Download Nomad.
nomad_architecture_map:
  amd64: "amd64"
  x86_64: "amd64"
  armv7l: "arm"
  aarch64: "arm64"
  32-bit: "386"
  64-bit: "amd64"
nomad_architecture: "{{ nomad_architecture_map[ansible_architecture] }}"
nomad_version: "0.10.2"
nomad_pkg: "nomad_{{ nomad_version }}_linux_{{ nomad_architecture }}.zip"
nomad_zip_url: "https://releases.hashicorp.com/nomad/{{ nomad_version }}/{{ nomad_pkg }}"

# Inst - System paths.
nomad_bin_dir: "/usr/local/bin"
nomad_config_dir: "/etc/nomad.d"
nomad_data_dir: "/var/nomad"
nomad_inst_dir: "/opt"
nomad_lockfile: "/var/lock/subsys/nomad"
nomad_run_dir: "/var/run/nomad"
nomad_ssl_dir: "/etc/nomad.d/ssl"

# Conf - Service.
nomad_node_role: "both"
nomad_restart_handler_state: "restarted"

# Conf - User and group.
nomad_group: "nomad"
nomad_group_state: "present"
nomad_manage_group: true
nomad_manage_user: true
nomad_user: "nomad"
nomad_user_groups: [ docker, nomad, root ]
nomad_user_state: "present"

# Conf - base.hcl
nomad_bind_addr: "0.0.0.0"
nomad_datacenter: "dc1"
nomad_disable_update_check: true
nomad_enable_debug: false
nomad_log_level: "INFO"
nomad_name: "{{ inventory_hostname }}"
nomad_region: "global"
nomad_syslog_enable: true

# Conf - base.hcl (TLS)
nomad_ca_file: "{{ nomad_ssl_dir }}/ca.pem"
nomad_cert_file: "{{ nomad_ssl_dir }}/nomad.pem"
nomad_http: false
nomad_key_file: "{{ nomad_ssl_dir }}/nomad-key.pem"
nomad_rpc: false

# Conf - client.hcl
nomad_certificates:
  - src: "{{ vault_nomad_ca_file }}"
    dest: "{{ nomad_ca_file }}"
  - src: "{{ vault_nomad_cert_file }}"
    dest: "{{ nomad_cert_file }}"
  - src: "{{ vault_nomad_key_file }}"
    dest: "{{ nomad_key_file }}"
nomad_node_class: ""
nomad_no_host_uuid: true
nomad_options: {}
nomad_servers: []

# Conf - custom.hcl
# empty

# Conf - server.hcl
#nomad_retry_max: 0
#nomad_retry_join: false
#nomad_retry_interval: "30s"
#nomad_rejoin_after_leave: false
#nomad_enabled_schedulers:
#  - service
#  - batch
#  - system
#nomad_num_schedulers: "{{ ansible_processor_vcpus }}"
#nomad_node_gc_threshold: "24h"
#nomad_job_gc_threshold: "4h"
#nomad_eval_gc_threshold: "1h"
#nomad_encrypt: ""