Skip to content

Commit 54490a5

Browse files
committed
Add cert generation tasks for ProxySQL
1 parent 002d8ed commit 54490a5

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

etc/kayobe/ansible/vault-generate-internal-tls.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,32 @@
5454
dest: "{{ kayobe_env_config_path }}/kolla/certificates/ca/vault.crt"
5555
mode: "0600"
5656
delegate_to: localhost
57+
58+
- name: Generate ProxySQL certificates
59+
when: kolla_enable_proxysql | bool
60+
block:
61+
- name: Copy ProxySQL certificate
62+
ansible.builtin.copy:
63+
dest: "{{ kayobe_env_config_path }}/kolla/certificates/proxysql-cert.pem"
64+
content: |
65+
{{ internal_cert.data.certificate }}
66+
{{ internal_cert.data.issuing_ca }}
67+
mode: "0600"
68+
delegate_to: localhost
69+
70+
- name: Copy ProxySQL certificate key
71+
ansible.builtin.copy:
72+
dest: "{{ kayobe_env_config_path }}/kolla/certificates/proxysql-key.pem"
73+
content: |
74+
{{ internal_cert.data.private_key }}
75+
mode: "0600"
76+
delegate_to: localhost
77+
78+
# NOTE(seunghunlee): Kolla-Ansible expects root CA explicitly named as
79+
# root.crt for ProxySQL
80+
- name: Copy ProxqlSQL root CA
81+
ansible.builtin.copy:
82+
src: "{{ kayobe_env_config_path }}/vault/OS-TLS-ROOT.pem"
83+
dest: "{{ kayobe_env_config_path }}/kolla/certificates/ca/root.crt"
84+
mode: "0600"
85+
delegate_to: localhost

0 commit comments

Comments
 (0)