Removes duplicate HAS_IPADDRESS variable assignment in postgresql_pg_hba. (#65408)
This commit is contained in:
parent
2eb615f1ef
commit
f4a9f23a1b
1 changed files with 2 additions and 6 deletions
|
@ -191,12 +191,8 @@ import traceback
|
||||||
IPADDRESS_IMP_ERR = None
|
IPADDRESS_IMP_ERR = None
|
||||||
try:
|
try:
|
||||||
import ipaddress
|
import ipaddress
|
||||||
HAS_IPADDRESS = True
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
IPADDRESS_IMP_ERR = traceback.format_exc()
|
IPADDRESS_IMP_ERR = traceback.format_exc()
|
||||||
HAS_IPADDRESS = False
|
|
||||||
else:
|
|
||||||
HAS_IPADDRESS = True
|
|
||||||
|
|
||||||
import tempfile
|
import tempfile
|
||||||
import shutil
|
import shutil
|
||||||
|
@ -684,8 +680,8 @@ def main():
|
||||||
add_file_common_args=True,
|
add_file_common_args=True,
|
||||||
supports_check_mode=True
|
supports_check_mode=True
|
||||||
)
|
)
|
||||||
if not HAS_IPADDRESS:
|
if IPADDRESS_IMP_ERR is not None:
|
||||||
module.fail_json(msg=missing_required_lib('psycopg2'), exception=IPADDRESS_IMP_ERR)
|
module.fail_json(msg=missing_required_lib('ipaddress'), exception=IPADDRESS_IMP_ERR)
|
||||||
|
|
||||||
contype = module.params["contype"]
|
contype = module.params["contype"]
|
||||||
create = bool(module.params["create"] or module.check_mode)
|
create = bool(module.params["create"] or module.check_mode)
|
||||||
|
|
Loading…
Reference in a new issue