openstack-ansible-os_octavia/tasks/octavia_certs_distribute.yml
James Gibson 94e59adeeb Do not log private key
Change-Id: I07587193a0f1f84f1842b64b88a827aa3927cfe6
2021-10-18 15:17:07 +01:00

30 lines
1.0 KiB
YAML

---
- name: Create certs directory
file:
path: /etc/octavia/certs/
state: directory
- name: Copy certificates
copy:
content: "{{ item.content }}"
dest: "{{ item.dest }}"
owner: "{{ octavia_system_user_name }}"
group: "{{ octavia_system_group_name }}"
mode: "0640"
no_log: true
with_items:
- content: "{{ hostvars[octavia_cert_setup_host]['octavia_ca_private_key_fact'] }}"
dest: "/etc/octavia/certs/ca_key.pem"
- content: "{{ hostvars[octavia_cert_setup_host]['octavia_ca_certificate_fact'] }}"
dest: "/etc/octavia/certs/ca.pem"
- content: "{{ hostvars[octavia_cert_setup_host]['octavia_server_ca_fact'] }}"
dest: "/etc/octavia/certs/server_ca.pem"
- content: "{{ hostvars[octavia_cert_setup_host]['octavia_client_ca_fact'] }}"
dest: "/etc/octavia/certs/client_ca.pem"
- content: "{{ hostvars[octavia_cert_setup_host]['octavia_client_cert_fact'] }}"
dest: "/etc/octavia/certs/client.pem"
notify:
- Restart octavia services
- Restart uwsgi services