Infra: Ansible Nomad
[csit.git] / resources / tools / testbed-setup / ansible / roles / nomad / defaults / main.yaml
1 ---
2 # file: roles/nomad/defaults/main.yaml
3
4 # Inst - Prerequisites.
5 packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
6
7 packages_base:
8   - "cgroup-bin"
9   - "curl"
10   - "git"
11   - "libcgroup1"
12   - "unzip"
13 packages_by_distro:
14   ubuntu:
15     - []
16 packages_by_arch:
17   aarch64:
18     - []
19   x86_64:
20     - []
21
22 # Inst - Download Nomad.
23 nomad_architecture_map:
24   amd64: "amd64"
25   x86_64: "amd64"
26   armv7l: "arm"
27   aarch64: "arm64"
28   32-bit: "386"
29   64-bit: "amd64"
30 nomad_architecture: "{{ nomad_architecture_map[ansible_architecture] }}"
31 nomad_version: "0.10.2"
32 nomad_pkg: "nomad_{{ nomad_version }}_linux_{{ nomad_architecture }}.zip"
33 nomad_zip_url: "https://releases.hashicorp.com/nomad/{{ nomad_version }}/{{ nomad_pkg }}"
34
35 # Inst - System paths.
36 nomad_bin_dir: "/usr/local/bin"
37 nomad_config_dir: "/etc/nomad.d"
38 nomad_data_dir: "/var/nomad"
39 nomad_inst_dir: "/opt"
40 nomad_lockfile: "/var/lock/subsys/nomad"
41 nomad_run_dir: "/var/run/nomad"
42 nomad_ssl_dir: "/etc/nomad.d/ssl"
43
44 # Conf - Service.
45 nomad_node_role: "both"
46 nomad_restart_handler_state: "restarted"
47
48 # Conf - User and group.
49 nomad_group: "nomad"
50 nomad_group_state: "present"
51 nomad_manage_group: true
52 nomad_manage_user: true
53 nomad_user: "nomad"
54 nomad_user_groups: [ docker, nomad, root ]
55 nomad_user_state: "present"
56
57 # Conf - base.hcl
58 nomad_bind_addr: "0.0.0.0"
59 nomad_datacenter: "dc1"
60 nomad_disable_update_check: true
61 nomad_enable_debug: false
62 nomad_log_level: "INFO"
63 nomad_name: "{{ inventory_hostname }}"
64 nomad_region: "global"
65 nomad_syslog_enable: true
66
67 # Conf - base.hcl (TLS)
68 nomad_ca_file: "{{ nomad_ssl_dir }}/ca.pem"
69 nomad_cert_file: "{{ nomad_ssl_dir }}/nomad.pem"
70 nomad_http: false
71 nomad_key_file: "{{ nomad_ssl_dir }}/nomad-key.pem"
72 nomad_rpc: false
73
74 # Conf - client.hcl
75 nomad_certificates:
76   - src: "{{ vault_nomad_ca_file }}"
77     dest: "{{ nomad_ca_file }}"
78   - src: "{{ vault_nomad_cert_file }}"
79     dest: "{{ nomad_cert_file }}"
80   - src: "{{ vault_nomad_key_file }}"
81     dest: "{{ nomad_key_file }}"
82 nomad_node_class: ""
83 nomad_no_host_uuid: true
84 nomad_options: {}
85 nomad_servers: []
86
87 # Conf - custom.hcl
88 # empty
89
90 # Conf - server.hcl
91 #nomad_retry_max: 0
92 #nomad_retry_join: false
93 #nomad_retry_interval: "30s"
94 #nomad_rejoin_after_leave: false
95 #nomad_enabled_schedulers:
96 #  - service
97 #  - batch
98 #  - system
99 #nomad_num_schedulers: "{{ ansible_processor_vcpus }}"
100 #nomad_node_gc_threshold: "24h"
101 #nomad_job_gc_threshold: "4h"
102 #nomad_eval_gc_threshold: "1h"
103 #nomad_encrypt: ""