Merge pull request 'Update 'tasks/mysql-conf.yml'' (!2) from tpiccioli-patch-2 into master
Reviewed-on: #2
This commit is contained in:
commit
41e5a8bd5c
|
@ -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