mysql_db: add use_shell parameter to prevent Broken pipe errors (#151)

* mysql_db: prevent broken pipe errors by using an intermediate shell process

* use module.run_command()

* mysql_db: add use_shell parameter

* add changelog fragment
This commit is contained in:
Andrew Klychkov 2020-04-20 18:46:54 +03:00 committed by GitHub
commit 3b5520ebf7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 13 deletions

View file

@ -157,6 +157,7 @@
state: import
target: '{{ db_file_name }}'
login_unix_socket: '{{ mysql_socket }}'
use_shell: yes
register: result
- name: show the tables
@ -174,6 +175,7 @@
state: import
target: '{{ dump_file1 }}'
login_unix_socket: '{{ mysql_socket }}'
use_shell: no
register: import_result
- name: assert output message restored a database from dump file1