1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
* postgresql_db dump does not fail on FATAL error when using compression
This commit is contained in:
Hideki Saito 2018-11-26 13:08:03 +09:00 committed by ansibot
parent 90c3337316
commit 731bf1b11d

View file

@ -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)