Update 'tasks/mysql-conf.yml' #6

Merged
tpiccioli merged 1 commits from tpiccioli-patch-2 into master 2021-10-18 14:22:43 +02:00
1 changed files with 9 additions and 1 deletions

View File

@ -33,6 +33,14 @@
- server
notify: Restart mysql
- name: Add AppArmor alias
lineinfile: path=/etc/apparmor.d/tunables/alias line='alias /var/lib/mysql/ -> {{ mysql_data_dir }}/,' insertafter=EOF
when: my_data_dir.stat.isdir is not defined
- name: Restart AppArmor service
service: name=apparmor state=restarted
when: my_data_dir.stat.isdir is not defined
- name: Start the mysql service with the new the data directory
service: name=mysql state=started
when: my_data_dir.stat.isdir is not defined