mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 15:11:23 -07:00
added support for custom port definition
This commit is contained in:
parent
ca7b5cc5a3
commit
8360f9f46c
2 changed files with 7 additions and 1 deletions
|
@ -77,6 +77,7 @@ def main():
|
|||
login_user=dict(default="postgres"),
|
||||
login_password=dict(default=""),
|
||||
login_host=dict(default=""),
|
||||
port=dict(default="5432"),
|
||||
db=dict(required=True, aliases=['name']),
|
||||
owner=dict(default=""),
|
||||
template=dict(default=""),
|
||||
|
@ -89,6 +90,7 @@ def main():
|
|||
module.fail_json(msg="the python psycopg2 module is required")
|
||||
|
||||
db = module.params["db"]
|
||||
port = module.params["port"]
|
||||
owner = module.params["owner"]
|
||||
template = module.params["template"]
|
||||
encoding = module.params["encoding"]
|
||||
|
@ -101,7 +103,8 @@ def main():
|
|||
params_map = {
|
||||
"login_host":"host",
|
||||
"login_user":"user",
|
||||
"login_password":"password"
|
||||
"login_password":"password",
|
||||
"port":"port"
|
||||
}
|
||||
kw = dict( (params_map[k], v) for (k, v) in module.params.iteritems()
|
||||
if k in params_map and v != '' )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue