Update 'tasks/mysql-conf.yml'
apparmor mod required on changing mysql data dir
This commit is contained in:
parent
a5dae2eba4
commit
3ba66fdba4
|
@ -33,6 +33,14 @@
|
||||||
- server
|
- server
|
||||||
notify: Restart mysql
|
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
|
- name: Start the mysql service with the new the data directory
|
||||||
service: name=mysql state=started
|
service: name=mysql state=started
|
||||||
when: my_data_dir.stat.isdir is not defined
|
when: my_data_dir.stat.isdir is not defined
|
||||||
|
|
Loading…
Reference in New Issue