mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-26 07:51:46 -07:00
Add dedpulication to command construct
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
parent
0b3d793572
commit
85696fe002
1 changed files with 3 additions and 3 deletions
|
@ -437,10 +437,10 @@ def db_dump(module, host, user, password, db_name, target, all_databases, port,
|
|||
elif os.path.splitext(target)[-1] == '.xz':
|
||||
path = module.get_bin_path('xz', True)
|
||||
|
||||
if pipefail and path:
|
||||
cmd = 'set -o pipefail && %s | %s > %s' % (cmd, path, shlex_quote(target))
|
||||
elif path:
|
||||
if path:
|
||||
cmd = '%s | %s > %s' % (cmd, path, shlex_quote(target))
|
||||
if pipefail:
|
||||
cmd = 'set -o pipefail && ' + cmd
|
||||
else:
|
||||
cmd += " > %s" % shlex_quote(target)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue