From bf685c4a51d7da228022471fda67e409d031605d Mon Sep 17 00:00:00 2001 From: Andrey Gubarev Date: Thu, 15 Feb 2018 10:55:57 +0300 Subject: [PATCH] add encrypt --- defaults/main.yml | 4 ++++ templates/client.json.j2 | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/defaults/main.yml b/defaults/main.yml index 702ffa2..2bc5b2c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -22,3 +22,7 @@ consul_conf_enable_syslog: yes consul_conf_leave_on_terminate: no consul_conf_skip_leave_on_interrupt: yes consul_conf_rejoin_after_leave: yes + +consul_conf_encrypt: +consul_conf_encrypt_verify_incoming: yes +consul_conf_encrypt_verify_outgoing: yes diff --git a/templates/client.json.j2 b/templates/client.json.j2 index fb2f8e2..98cc64c 100644 --- a/templates/client.json.j2 +++ b/templates/client.json.j2 @@ -2,6 +2,12 @@ "server": false, "ui": false, + {% if consul_conf_encrypt %} + "encrypt": {{ consul_conf_encrypt | to_json }}, + "encrypt_verify_incoming": {{ consul_conf_encrypt_verify_incoming | to_json }}, + "encrypt_verify_outgoing": {{ consul_conf_encrypt_verify_outgoing | to_json }}, + {% endif %} + "data_dir": "{{ consul_data_dir }}", "pid_file": "{{ consul_data_dir }}/consul.pid", "datacenter": "{{ consul_datacenter }}",