Skip to content

Commit 1d1de00

Browse files
authored
Allow the option to set grpc_ca_file in the config (#185)
This option is required if you want to use consul connect and have gRPC TLS enabled. It will default to the default CA but can be overwritten if needed. Co-authored-by: Wouter D'Haeseleer <wodh@inuits.eu>
1 parent 3050474 commit 1d1de00

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,11 @@ in many Ansible versions, so this feature might not always work.
512512
- Public key of consul CA, use in combination with `nomad_consul_cert_file` and `nomad_consul_key_file`.
513513
- Default value: ""
514514

515+
### `nomad_consul_grpc_ca_file`
516+
517+
- Public key of consul CA to validate the gRPC TLS, use in combination with `nomad_consul_cert_file` and `nomad_consul_key_file`.
518+
- Default value: **nomad_consul_ca_file**
519+
515520
### `nomad_consul_cert_file`
516521

517522
- The public key which can be used to access consul.

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ nomad_use_consul: false
148148
nomad_consul_address: localhost:8500
149149
nomad_consul_ssl: false
150150
nomad_consul_ca_file: ""
151+
nomad_consul_grpc_ca_file: "{{ nomad_consul_ca_file }}"
151152
nomad_consul_cert_file: ""
152153
nomad_consul_key_file: ""
153154
nomad_consul_token: ""

templates/base.hcl.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ consul {
2424
address = "{{ nomad_consul_address }}"
2525
ssl = {{ nomad_consul_ssl | bool | lower }}
2626
ca_file = "{{ nomad_consul_ca_file }}"
27+
grpc_ca_file = "{{ nomad_consul_grpc_ca_file }}"
2728
cert_file = "{{ nomad_consul_cert_file }}"
2829
key_file = "{{ nomad_consul_key_file }}"
2930
token = "{{ nomad_consul_token }}"

0 commit comments

Comments
 (0)