cleanup tls tasks

This commit is contained in:
Robert Kaussow 2019-06-10 15:20:25 +02:00
parent 54f0e97032
commit c59c02180d
2 changed files with 1 additions and 16 deletions

View File

@ -26,8 +26,6 @@ postgres_password_encryption: md5
postgres_tls_enabled: False
postgres_tls_cert_filename: "mycert.pem"
postgres_tls_key_filename: "mykey.pem"
postgres_tls_source_use_content: False
postgres_tls_source_use_files: True
postgres_tls_cert_source: mycert.pem
postgres_tls_key_source: mykey.pem

View File

@ -14,7 +14,7 @@
become_user: root
- block:
- name: Copy certs and private key (file)
- name: Copy certs and private key
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
@ -24,18 +24,5 @@
- { src: "{{ postgres_tls_cert_source }}", dest: '{{ __postgres_tls_cert_path }}', mode: '0750' }
loop_control:
label: "{{ item.dest }}"
when: postgres_tls_source_use_files
- name: Copy certs and private key (content)
copy:
content: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
with_items:
- { src: "{{ postgres_tls_key_source }}", dest: '{{ __postgres_tls_key_path }}', mode: '0600' }
- { src: "{{ postgres_tls_cert_source }}", dest: '{{ __postgres_tls_cert_path }}', mode: '0750' }
loop_control:
label: "{{ item.dest }}"
when: postgres_tls_source_use_content
become: True
become_user: "{{ postgres_user }}"