diff --git a/defaults/main.yml b/defaults/main.yml index 89c6849..cb896be 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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 diff --git a/tasks/tls.yml b/tasks/tls.yml index 227ea99..03c753c 100644 --- a/tasks/tls.yml +++ b/tasks/tls.yml @@ -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 }}"