Update 'tasks/mysql-conf.yml'
This commit is contained in:
parent
cca809841c
commit
b8aa13a5d1
|
@ -12,6 +12,13 @@
|
|||
- name: Create the data directory
|
||||
file: dest={{ mysql_data_dir }} state=directory owner=mysql group=mysql mode=0700
|
||||
|
||||
- name: Copy data to the new directory
|
||||
synchronize:
|
||||
src: /var/lib/mysql
|
||||
dest: {{ mysql_data_dir }}
|
||||
delegate_to: "{{ inventory_hostname }}"
|
||||
when: my_data_dir.stat.isdir is not defined
|
||||
|
||||
- name: Create the log directory
|
||||
file: dest={{ mysql_log_dir }} state=directory owner=mysql group=adm mode=1750
|
||||
|
||||
|
@ -29,7 +36,7 @@
|
|||
notify: Restart mysql
|
||||
|
||||
- name: Start the mysql service with the new the data directory
|
||||
service: name=mysql state=stopped
|
||||
service: name=mysql state=started
|
||||
when: my_data_dir.stat.isdir is not defined
|
||||
|
||||
when: mysql_enabled | bool
|
||||
|
|
Loading…
Reference in New Issue