-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathssl_config.yml
More file actions
40 lines (36 loc) · 990 Bytes
/
ssl_config.yml
File metadata and controls
40 lines (36 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
- name: Ensure SSL dir exists for MySQL
ansible.builtin.file:
path: "{{ MYSQL_CONFIG_SSL_DIR }}"
state: directory
owner: mysql
group: mysql
mode: '0700'
- name: Install ca.pem
ansible.builtin.copy:
dest: "{{ MYSQL_CONFIG_SSL_DIR }}/ca.pem"
content: "{{ MYSQL_CONFIG_SSL_CA_PEM }}"
owner: mysql
group: mysql
mode: '0600'
- name: Install server-cert.pem
ansible.builtin.copy:
dest: "{{ MYSQL_CONFIG_SSL_DIR }}/server-cert.pem"
content: "{{ MYSQL_CONFIG_SSL_SERVER_CERT_PEM }}"
owner: mysql
group: mysql
mode: '0644'
- name: Install server-key.pem
ansible.builtin.copy:
dest: "{{ MYSQL_CONFIG_SSL_DIR }}/server-key.pem"
content: "{{ MYSQL_CONFIG_SSL_SERVER_KEY_PEM }}"
owner: mysql
group: mysql
mode: '0600'
- name: Put SSL configuration file
ansible.builtin.template:
src: ssl.cnf.j2
dest: "{{ MYSQL_CONFIG_EXTRA_CONFIG_PATH }}/ssl.cnf"
mode: preserve
notify:
- Restart mysql