From 290bc993a54ece97d65a617db8692cc6bd18de01 Mon Sep 17 00:00:00 2001 From: Julien BONACHERA Date: Sun, 10 Dec 2017 13:00:25 +0100 Subject: [PATCH] append newline char to vault generated certs --- roles/vault/tasks/bootstrap/ca_trust.yml | 2 +- roles/vault/tasks/shared/issue_cert.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/vault/tasks/bootstrap/ca_trust.yml b/roles/vault/tasks/bootstrap/ca_trust.yml index 010e6bbc6..e5c9bcd35 100644 --- a/roles/vault/tasks/bootstrap/ca_trust.yml +++ b/roles/vault/tasks/bootstrap/ca_trust.yml @@ -19,7 +19,7 @@ - name: bootstrap/ca_trust | add CA to trusted CA dir copy: - content: "{{ vault_cert_file_cat.get('stdout') }}" + content: "{{ vault_cert_file_cat.get('stdout') }}\n" dest: "{{ ca_cert_path }}" register: vault_ca_cert diff --git a/roles/vault/tasks/shared/issue_cert.yml b/roles/vault/tasks/shared/issue_cert.yml index 24db59957..1ba90ea77 100644 --- a/roles/vault/tasks/shared/issue_cert.yml +++ b/roles/vault/tasks/shared/issue_cert.yml @@ -83,7 +83,7 @@ - name: "issue_cert | Copy {{ issue_cert_path }} cert to all hosts" copy: - content: "{{ issue_cert_result['json']['data']['certificate'] }}" + content: "{{ issue_cert_result['json']['data']['certificate'] }}\n" dest: "{{ issue_cert_path }}" group: "{{ issue_cert_file_group | d('root' )}}" mode: "{{ issue_cert_file_mode | d('0644') }}" @@ -99,7 +99,7 @@ - name: issue_cert | Copy issuing CA cert copy: - content: "{{ issue_cert_result['json']['data']['issuing_ca'] }}" + content: "{{ issue_cert_result['json']['data']['issuing_ca'] }}\n" dest: "{{ issue_cert_path | dirname }}/ca.pem" group: "{{ issue_cert_file_group | d('root' )}}" mode: "{{ issue_cert_file_mode | d('0644') }}"