Fix Octavia certificate file path and content

Certificate files were being created in a wrong path and with invalid
content. The bug was caused because Ansible variables were not being
quoted, and as so Ansible assumed plain text instead.

Closes-Bug: #1830190

Change-Id: Ie576537d77b57927d430f20b274d1cb5d351241e
(cherry picked from commit 4de9f78b29)
(cherry picked from commit 71c099f209)
This commit is contained in:
Carlos Goncalves 2019-05-23 12:25:52 +02:00
parent c4839a8b09
commit 77ae653289
2 changed files with 10 additions and 4 deletions

View File

@ -10,13 +10,13 @@
become: true become: true
copy: copy:
content: "{{ item.content }}" content: "{{ item.content }}"
dest: "{{ octavia_confd_prefix }}{{ item.path }}" dest: "{{ octavia_confd_prefix }}/{{ item.path }}"
selevel: s0 selevel: s0
setype: svirt_sandbox_file_t setype: svirt_sandbox_file_t
no_log: true no_log: true
loop: loop:
- { content: private_key_content, path: ca_private_key_path } - { content: "{{ private_key_content }}", path: "{{ ca_private_key_path }}" }
- { content: ca_cert_content, path: ca_cert_path } - { content: "{{ ca_cert_content }}", path: "{{ ca_cert_path }}" }
- { content: service_pem_content, path: client_cert_path } - { content: "{{ service_pem_content }}" , path: "{{ client_cert_path }}" }
notify: notify:
- octavia config updated - octavia config updated

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixed an issue were amphora load balancers would fail to create. The
problem was because Octavia certificate files were being created in a wrong
path and with invalid content.