mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 22:51:23 -07:00
* postgresql_db dump does not fail on FATAL error when using compression
This commit is contained in:
parent
90c3337316
commit
731bf1b11d
1 changed files with 3 additions and 0 deletions
|
@ -460,6 +460,9 @@ def main():
|
||||||
module.fail_json(msg=to_native(e), exception=traceback.format_exc())
|
module.fail_json(msg=to_native(e), exception=traceback.format_exc())
|
||||||
|
|
||||||
elif state in ("dump", "restore"):
|
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
|
method = state == "dump" and db_dump or db_restore
|
||||||
try:
|
try:
|
||||||
rc, stdout, stderr, cmd = method(module, target, target_opts, db, **kw)
|
rc, stdout, stderr, cmd = method(module, target, target_opts, db, **kw)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue