Skip to content

Commit

Permalink
Add copy of TLS listener cert and key files
Browse files Browse the repository at this point in the history
  • Loading branch information
Trevor Robinson committed Aug 19, 2016
1 parent 773e92e commit ab73936
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ vault_backend_file_path: ''
vault_listener_tcp_address: "127.0.0.1:8200"
vault_listener_tcp_tls_disable: true
vault_listener_tcp_tls_cert_file: ''
vault_listener_tcp_tls_cert_local_file: ''
vault_listener_tcp_tls_key_file: ''
vault_listener_tcp_tls_key_local_file: ''
vault_listener_tcp_tls_min_version: tls12

vault_telemetry_statsite_address: ''
Expand Down
22 changes: 22 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,28 @@
notify: restart vault
tags: vault

- name: Copy Vault TLS certificate
copy: >
dest="{{ vault_listener_tcp_tls_cert_file }}"
src="{{ vault_listener_tcp_tls_cert_local_file }}"
owner={{ vault_user }}
group={{ vault_group }}
mode=0644
notify: restart vault
when: vault_listener_tcp_tls_cert_file and vault_listener_tcp_tls_cert_local_file
tags: vault

- name: Copy Vault TLS key
copy: >
dest="{{ vault_listener_tcp_tls_key_file }}"
src="{{ vault_listener_tcp_tls_key_local_file }}"
owner={{ vault_user }}
group={{ vault_group }}
mode=0600
notify: restart vault
when: vault_listener_tcp_tls_key_file and vault_listener_tcp_tls_key_local_file
tags: vault

- name: Give vault access to mlock syscall
capabilities: >
path={{ vault_install_dir }}/vault
Expand Down

0 comments on commit ab73936

Please sign in to comment.