mariadb.yml aktualisiert

This commit is contained in:
olli 2024-05-27 15:34:30 +02:00
parent f41341d73a
commit eb413f3489

View File

@ -94,18 +94,12 @@
backup: yes
validate: /bin/bash -n %s
- name: /home/docker/mariadb.{{inventory_hostname}}/genssl.sh shebang
- name: /usr/local/sbin/autoupdate.d/mariadb-ssl.update shebang
lineinfile:
path: /home/docker/mariadb.{{inventory_hostname}}/genssl.sh
path: /usr/local/sbin/autoupdate.d/mariadb-ssl.update
insertbefore: BOF
line: "#!/bin/bash -e"
- name: Gen initial SSL if not exists
ansible.builtin.shell: ./genssl.sh
args:
chdir: /home/docker/mariadb.{{inventory_hostname}}
creates: /home/docker/mariadb.{{inventory_hostname}}/ssl/certificate.pem
- name: /home/docker/mariadb.{{inventory_hostname}}/ssl.cnf (use ssl in mariadb)
blockinfile:
path: /home/docker/mariadb.{{inventory_hostname}}/ssl.cnf
@ -210,6 +204,11 @@
backup: yes
notify: Restart mariadb
- name: Get letsencrypt cert from traefik
ansible.builtin.shell: /usr/local/sbin/autoupdate.d/mariadb-ssl.update
args:
chdir: /home/docker/mariadb.{{inventory_hostname}}
creates: /home/docker/mariadb.{{inventory_hostname}}/ssl/certificate.pem
handlers: