forked from jeduardo/nomad-formula
-
Notifications
You must be signed in to change notification settings - Fork 13
/
pillar.example
58 lines (57 loc) · 2.11 KB
/
pillar.example
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
# vim: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab autoindent ft=sls syntax=yaml:
nomad:
bin_dir: /usr/bin
config_dir: /etc/nomad.d
use_local_service_file: False
config:
data_dir: /var/lib/nomad
# Nodes not bound to consul must be configured to advertise themselves.
advertise:
http: "{%- for interface, ips in grains['ip4_interfaces'].items()
if interface not in ['lo', 'cni0', 'docker0'] and
not interface.startswith('veth') and
ips|length > 0 %}
{%- if loop.first %}
{{- ips[0] -}}
{%- endif %}
{%- endfor %}"
rpc: "{%- for interface, ips in grains['ip4_interfaces'].items()
if interface not in ['lo', 'cni0', 'docker0'] and
not interface.startswith('veth') and
ips|length > 0 %}
{%- if loop.first %}
{{- ips[0] -}}
{%- endif %}
{%- endfor %}"
serf: "{%- for interface, ips in grains['ip4_interfaces'].items()
if interface not in ['lo', 'cni0', 'docker0'] and
not interface.startswith('veth') and
ips|length > 0 %}
{%- if loop.first %}
{{- ips[0] -}}
{%- endif %}
{%- endfor %}"
server:
enabled: True
bootstrap_expect: 1
encrypt: "AaABbB+CcCdDdEeeFFfggG=="
client:
enabled: True
# Sample configuration for a Consul deployment:
# consul:
# ssl: True
# address: "{{grains['id']}}:8543"
# token: "deadbeef-dead-beef-dead-beefdeadbee"
# ca_file: "/srv/certs/ca.crt"
# cert_file: "/srv/certs/{{grains['id']}}.pem"
# key_file: "/srv/certs/{{grains['id']}}.key"
# server_auto_join: True
# client_auto_join: True
# Sample configuration for TLS encryption:
# tls:
# http: True
# rpc: True
# ca_file: "/srv/certs/ca.crt"
# cert_file: "/srv/certs/{{grains['id']}}.pem"
# key_file: "/srv/certs/{{grains['id']}}.key"
# verify_server_hostname: True