Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgresql_user: fix doc formatting, added return value, aliases, misc code changes #54768

Merged
merged 6 commits into from
Apr 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions lib/ansible/modules/database/postgresql/postgresql_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
- Name of the extension to add or remove.
required: true
type: str
aliases:
- ext
db:
description:
- Name of the database to add or remove the extension to/from.
Expand All @@ -40,6 +42,7 @@
description:
- The username used to authenticate with.
type: str
default: postgres
login_password:
description:
- The password used to authenticate with.
Expand All @@ -48,7 +51,6 @@
description:
- Host running the database.
type: str
default: localhost
login_unix_socket:
description:
- Path to a Unix domain socket for local connections.
Expand All @@ -70,14 +72,16 @@
- Specifies the name of a file containing SSL certificate authority (CA)
certificate(s). If the file exists, the server's certificate will be
verified to be signed by one of these authorities.
type: path
type: str
version_added: '2.8'
aliases: [ ssl_rootcert ]
port:
description:
- Database port to connect to.
default: 5432
type: int
aliases:
- login_port
session_role:
description:
- Switch to session_role after connecting.
Expand Down Expand Up @@ -219,14 +223,10 @@ def main():
argument_spec = postgres_common_argument_spec()
argument_spec.update(
db=dict(type="str", required=True, aliases=["login_db"]),
port=dict(type="int", default=5432, aliases=["login_port"]),
ext=dict(type="str", required=True, aliases=['name']),
ext=dict(type="str", required=True, aliases=["name"]),
schema=dict(type="str"),
state=dict(type="str", default="present", choices=["absent", "present"]),
cascade=dict(type='bool', default=False),
ssl_mode=dict(type='str', default='prefer', choices=[
'disable', 'allow', 'prefer', 'require', 'verify-ca', 'verify-full']),
ca_cert=dict(type="path", default=None, aliases=['ssl_rootcert']),
cascade=dict(type="bool", default=False),
session_role=dict(type="str"),
)

Expand Down
5 changes: 0 additions & 5 deletions lib/ansible/modules/database/postgresql/postgresql_lang.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
description:
- Host running PostgreSQL where you want to execute the actions.
type: str
default: localhost
session_role:
version_added: '2.8'
description:
Expand Down Expand Up @@ -267,16 +266,12 @@ def main():
argument_spec = postgres_common_argument_spec()
argument_spec.update(
db=dict(type="str", required=True, aliases=["login_db"]),
port=dict(type="int", default=5432, aliases=["login_port"]),
lang=dict(type="str", required=True, aliases=["name"]),
state=dict(type="str", default="present", choices=["absent", "present"]),
trust=dict(type="bool", default="no"),
force_trust=dict(type="bool", default="no"),
cascade=dict(type="bool", default="no"),
fail_on_drop=dict(type="bool", default="yes"),
ssl_mode=dict(default='prefer', choices=[
'allow', 'disable', 'prefer', 'require', 'verify-ca', 'verify-full']),
ca_cert=dict(default=None, aliases=["ssl_rootcert"]),
session_role=dict(type="str"),
)

Expand Down
4 changes: 3 additions & 1 deletion lib/ansible/modules/database/postgresql/postgresql_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
- Name of the schema to add or remove.
required: true
type: str
aliases:
- schema
database:
description:
- Name of the database to connect to and add or remove the schema.
Expand All @@ -36,6 +38,7 @@
description:
- The username used to authenticate with.
type: str
default: postgres
login_password:
description:
- The password used to authenticate with.
Expand All @@ -44,7 +47,6 @@
description:
- Host running the database.
type: str
default: localhost
login_unix_socket:
description:
- Path to a Unix domain socket for local connections.
Expand Down