b875c88c74c612566c66ed56c149a58b1252b5a7
[csit.git] / fdio.infra.ansible / roles / consul / defaults / main.yaml
1 ---
2 # file: roles/consul/defaults/main.yaml
3
4 # Inst - Prerequisites.
5 packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
6 packages_base:
7   - "curl"
8   - "unzip"
9 packages_by_distro:
10   ubuntu:
11     - []
12 packages_by_arch:
13   aarch64:
14     - []
15   x86_64:
16     - []
17
18 # Inst - Consul Map.
19 consul_architecture_map:
20   amd64: "amd64"
21   x86_64: "amd64"
22   armv7l: "arm"
23   aarch64: "arm64"
24   32-bit: "386"
25   64-bit: "amd64"
26 consul_architecture: "{{ consul_architecture_map[ansible_architecture] }}"
27 consul_version: "1.9.5"
28 consul_pkg: "consul_{{ consul_version }}_linux_{{ consul_architecture }}.zip"
29 consul_zip_url: "https://releases.hashicorp.com/consul/{{ consul_version }}/{{ consul_pkg }}"
30
31 # Inst - System paths.
32 consul_bin_dir: "/usr/local/bin"
33 consul_config_dir: "/etc/consul.d"
34 consul_data_dir: "/var/consul"
35 consul_inst_dir: "/opt"
36 consul_lockfile: "/var/lock/subsys/consul"
37 consul_run_dir: "/var/run/consul"
38 consul_ssl_dir: "/etc/consul.d/ssl"
39 nomad_config_dir: "/etc/nomad.d"
40
41 # Conf - Service.
42 consul_node_role: "both"
43 consul_restart_handler_state: "restarted"
44 nomad_restart_handler_state: "restarted"
45 systemd_resolved_state: "stopped"
46
47 # Conf - User and group.
48 consul_group: "consul"
49 consul_group_state: "present"
50 consul_user: "consul"
51 consul_user_state: "present"
52
53 # Conf - nomad.d/consul.hcl
54 consul_nomad_integration: true
55 consul_certificates:
56   - src: "{{ file_consul_ca_pem }}"
57     dest: "{{ consul_ca_file }}"
58   - src: "{{ file_consul_server_0_pem }}"
59     dest: "{{ consul_cert_file }}"
60   - src: "{{ file_consul_server_0_key_pem }}"
61     dest: "{{ consul_key_file }}"
62
63 consul_auto_advertise: true
64 consul_checks_use_advertise: true
65 consul_server_service_name: "nomad"
66 consul_client_service_name: "nomad-client"
67 consul_server_auto_join: false
68 consul_client_auto_join: true
69 consul_ACL_token_set: false
70 consul_token: "consul_token_default"
71
72 # Conf - base.hcl
73 consul_bind_addr: "{{ ansible_default_ipv4.address }}"
74 consul_client_addr: "0.0.0.0"
75 consul_datacenter: "dc1"
76 consul_disable_update_check: true
77 consul_enable_debug: false
78 consul_enable_syslog: true
79 consul_log_level: "INFO"
80 consul_node_name: "{{ inventory_hostname }}"
81 consul_retry_join: true
82 consul_bootstrap_expect: 2
83 consul_encrypt: ""
84 consul_ca_file: "{{ consul_ssl_dir }}/ca.pem"
85 consul_cert_file: "{{ consul_ssl_dir }}/consul.pem"
86 consul_key_file: "{{ consul_ssl_dir }}/consul-key.pem"
87 consul_ui_config:
88   enabled: true
89 consul_recursors:
90   - 1.1.1.1
91   - 8.8.8.8
92
93 # Conf - ports.hcl
94 consul_port_dns: 53
95 consul_port_http: 8500
96 consul_port_https: 8501
97 consul_port_grpc: 8502
98 consul_port_serf_lan: 8301
99 consul_port_serf_wan: 8302
100 consul_port_server: 8300
101
102 # Conf - services.json
103 consul_services: false