Skip to content

Commit

Permalink
Merge pull request #30 from tbartelmess/f-https-address
Browse files Browse the repository at this point in the history
Use HTTPS when TLS is enabled
  • Loading branch information
brianshumate authored Oct 12, 2017
2 parents 00d9104 + f9d364f commit 9dcc46b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ vault_consul_service: vault

vault_tls_config_path: /etc/vault/tls
vault_tls_disable: "{{ lookup('env','VAULT_TLS_DISABLE') | default(1, true) }}"
vault_protocol: "{% if vault_tls_disable %}http{% else %}https{% endif %}"
vault_tls_cert_file: "../files/{{ vault_node_name }}.crt"
# /etc/pki/tls/certs/vault.crt is distribution-specific/not a good default
# a distribution-specific play to link into expected destination is preferred
Expand Down
4 changes: 2 additions & 2 deletions templates/vault_backend_consul.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ backend "consul" {
datacenter = "{{ vault_datacenter }}"
path = "{{ vault_consul_path }}"
service = "{{ vault_consul_service }}"
cluster_addr = "http://{{ vault_cluster_address }}:{{ _vault_plus_one_port }}"
redirect_addr = "http://{{ vault_redirect_address }}:{{ vault_port }}"
cluster_addr = "{{vault_protocol}}://{{ vault_cluster_address }}:{{ _vault_plus_one_port }}"
redirect_addr = "{{vault_protocol}}://{{ vault_redirect_address }}:{{ vault_port }}"
disable_clustering = "{{ vault_cluster_disable }}"
}

0 comments on commit 9dcc46b

Please sign in to comment.