From c59c02180d985a25234b4ffbc0c3d2e9c24f7da6 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 10 Jun 2019 15:20:25 +0200 Subject: [PATCH] cleanup tls tasks --- defaults/main.yml | 2 -- tasks/tls.yml | 15 +-------------- 2 files changed, 1 insertion(+), 16 deletions(-) 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 }}"