mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-06 16:46:54 +02:00
Update to 2022-09-04 14:00
This commit is contained in:
@@ -76,3 +76,37 @@ acl {
|
||||
enabled = {{ consul_conf.acl.enabled | ternary('true', 'false') }}
|
||||
default_policy = "{{ consul_conf.acl.default_policy }}"
|
||||
}
|
||||
|
||||
{% if consul_conf.tls.enabled %}
|
||||
# TLS settings
|
||||
tls {
|
||||
{% for section in ['defaults', 'grpc', 'https', 'internal_rpc'] %}
|
||||
{% if consul_conf.tls[section] is defined %}
|
||||
{{ section }} {
|
||||
{% for key in ['ca_file', 'ca_path', 'cert_file', 'key_file', 'tls_min_version', 'tls_cipher_suites'] %}
|
||||
{% if consul_conf.tls[section][key] is defined %}
|
||||
{{ key }} = "{{ consul_conf.tls[section][key] }}"
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% for key in ['verify_incoming', 'verify_outgoing', 'verify_server_hostname'] %}
|
||||
{% if consul_conf.tls[section][key] is defined %}
|
||||
{{ key }} = {{ consul_conf.tls[section][key] | ternary('true', 'false') }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
}
|
||||
|
||||
# auto_encrypt, to distribute certificates from servers to clients
|
||||
{% if consul_conf.server %}
|
||||
auto_encrypt {
|
||||
allow_tls = true
|
||||
}
|
||||
{% else %}
|
||||
auto_encrypt {
|
||||
tls = true
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user