2018-05-15 02:36:50 -04:00
|
|
|
listener "{{ config.listen_protocol }}" {
|
|
|
|
address = "{{ config.listen_address }}:{{ config.listen_port }}"
|
|
|
|
tls_disable = {{ config.tls_disable }}
|
|
|
|
{%- if self_signed_cert.enabled %}
|
|
|
|
tls_cert_file = "/etc/vault/{{ self_signed_cert.hostname }}.pem"
|
|
|
|
tls_key_file = "/etc/vault/{{ self_signed_cert.hostname }}-nopass.key"
|
2018-05-15 02:02:03 -04:00
|
|
|
{% else -%}
|
2018-05-15 02:36:50 -04:00
|
|
|
{%- if config.tls_cert_file %}
|
|
|
|
tls_cert_file = "{{ config.tls_cert_file }}"
|
2018-05-15 02:41:05 -04:00
|
|
|
{%- endif -%}
|
2018-05-15 02:36:50 -04:00
|
|
|
{%- if config.tls_key_file %}
|
|
|
|
tls_key_file = "{{ config.tls_key_file }}"
|
2018-05-15 02:02:03 -04:00
|
|
|
{% endif -%}
|
2018-05-15 02:39:49 -04:00
|
|
|
{% endif -%}
|
2018-05-15 02:02:03 -04:00
|
|
|
}
|
|
|
|
|
2018-05-15 02:36:50 -04:00
|
|
|
{%- if config.backend and config.backend.type == "s3" %}
|
2018-05-15 02:02:03 -04:00
|
|
|
backend "s3" {
|
2018-05-15 02:36:50 -04:00
|
|
|
bucket = "{{ config.backend.bucket }}"
|
2018-05-15 02:02:03 -04:00
|
|
|
}
|
|
|
|
{% endif -%}
|
|
|
|
|
2018-05-15 02:36:50 -04:00
|
|
|
{%- if config.storage and config.storage.type == "consul" %}
|
2018-05-15 02:02:03 -04:00
|
|
|
storage "consul" {
|
2018-05-15 02:36:50 -04:00
|
|
|
address = "{{ config.storage.address }}"
|
|
|
|
path = "{{ config.storage.path }}"
|
2018-05-15 02:02:03 -04:00
|
|
|
}
|
2018-05-15 02:42:34 -04:00
|
|
|
{% else -%}
|
2018-05-15 02:02:03 -04:00
|
|
|
storage "file" {
|
2018-05-15 02:36:50 -04:00
|
|
|
path = "{{ config.data_dir }}"
|
2018-05-15 02:02:03 -04:00
|
|
|
}
|
2018-05-15 02:39:49 -04:00
|
|
|
{% endif %}
|
2018-05-15 02:02:03 -04:00
|
|
|
|
2018-05-15 02:36:50 -04:00
|
|
|
default_lease_ttl="{{ config.default_lease_ttl }}"
|
|
|
|
max_lease_ttl="{{ config.max_lease_ttl }}"
|