diff --git a/roles/consul/defaults/main.yml b/roles/consul/defaults/main.yml index 0206348..0021b5b 100644 --- a/roles/consul/defaults/main.yml +++ b/roles/consul/defaults/main.yml @@ -27,6 +27,12 @@ hs_consul_node_cert_fullchain: "{{ hs_consul_local_secrets_dir }}/self.fullchain # * Path to local node certificate private key. hs_consul_node_cert_private_key: "{{ hs_consul_local_secrets_dir }}/self.cert.key" + + # TODO: + #__hs_consul_self_private_key: "{{ __hs_consul_tls_dir }}/self.cert.key" + #__hs_consul_self_certificate: "{{ __hs_consul_tls_dir }}/self.fullchain.cert.pem" + + tf_module_name: "consul_config" hs_tf_action: apply diff --git a/roles/consul/handlers/main.yml b/roles/consul/handlers/main.yml index 5b13517..cf3ea1c 100644 --- a/roles/consul/handlers/main.yml +++ b/roles/consul/handlers/main.yml @@ -3,6 +3,7 @@ systemd: name: consul state: restarted + daemon_reload: true enabled: true - name: Update ca trust diff --git a/roles/consul/tasks/_tf_configure.yml b/roles/consul/tasks/_tf_configure.yml index ee5a226..57912d4 100644 --- a/roles/consul/tasks/_tf_configure.yml +++ b/roles/consul/tasks/_tf_configure.yml @@ -42,6 +42,12 @@ datacenter: "{{ hs_consul_datacenter_name }}" token: "{{ hs_consul_root.SecretID }}" ca_file: "{{ hs_consul_use_custom_ca | ternary(hs_consul_local_ca_cert, '') | default(omit, true) }}" + environment: + TF_CLI_ARGS: "" + TF_CLI_ARGS_init: "" + TF_CLI_ARGS_plan: "" + TF_CLI_ARGS_apply: "" + TF_CLI_ARGS_destroy: "" register: tf_result delegate_to: localhost become: false