[stable-2.5] Detect the socket path after starting the service. Fixes #47582 (#47626)

(cherry picked from commit 10e129e)

Co-authored-by: Matt Martz <matt@sivel.net>
pull/47951/head
Toshio Kuratomi 6 years ago committed by Matt Davis
parent cdc798df8f
commit ffcad9adec

@ -82,3 +82,12 @@
- name: start mysql_db service if not running - name: start mysql_db service if not running
service: name={{ mysql_service }} state=started service: name={{ mysql_service }} state=started
- name: Detect socket path
shell: >
echo "show variables like 'socket'\G" | mysql | grep 'Value: ' | sed 's/[ ]\+Value: //'
register: _socket_path
- name: Set socket path
set_fact:
mysql_socket: '{{ _socket_path["stdout"] }}'

Loading…
Cancel
Save