* postgresql_db dump does not fail on FATAL error when using compression
pull/47968/head
Hideki Saito 6 years ago committed by ansibot
parent 90c3337316
commit 731bf1b11d

@ -460,6 +460,9 @@ def main():
module.fail_json(msg=to_native(e), exception=traceback.format_exc())
elif state in ("dump", "restore"):
if not db_exists(cursor, db) and state == "dump":
module.fail_json(
msg="database \"{db}\" does not exist".format(db=db))
method = state == "dump" and db_dump or db_restore
try:
rc, stdout, stderr, cmd = method(module, target, target_opts, db, **kw)

Loading…
Cancel
Save