From fc6c500b5ba292bb884cecd78601c396b33c6e46 Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Sat, 22 Dec 2018 20:28:56 +0530 Subject: [PATCH] postgresql_user: set type of conn_limit (#50178) conn_limit type is set to 'int'. This will allow module to compare conn_limit with record value without type casting. Fixes: #38118 Signed-off-by: Abhijeet Kasurde --- .../fragments/38118-postgresql_user-fix_conn_limit_type.yml | 3 +++ lib/ansible/modules/database/postgresql/postgresql_user.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/38118-postgresql_user-fix_conn_limit_type.yml diff --git a/changelogs/fragments/38118-postgresql_user-fix_conn_limit_type.yml b/changelogs/fragments/38118-postgresql_user-fix_conn_limit_type.yml new file mode 100644 index 0000000000..5582edce8d --- /dev/null +++ b/changelogs/fragments/38118-postgresql_user-fix_conn_limit_type.yml @@ -0,0 +1,3 @@ +--- +minor_changes: + - conn_limit type is set to 'int' in postgresql_user module. This will allow module to compare conn_limit with record value without type casting. diff --git a/lib/ansible/modules/database/postgresql/postgresql_user.py b/lib/ansible/modules/database/postgresql/postgresql_user.py index 2414137f11..f86d8afb69 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_user.py +++ b/lib/ansible/modules/database/postgresql/postgresql_user.py @@ -135,6 +135,7 @@ options: description: - Specifies the user connection limit. version_added: '2.4' + type: int notes: - The default authentication assumes that you are either logging in as or sudo'ing to the postgres account on the host. @@ -742,7 +743,7 @@ def main(): ssl_mode=dict(default='prefer', choices=[ 'disable', 'allow', 'prefer', 'require', 'verify-ca', 'verify-full']), ssl_rootcert=dict(default=None), - conn_limit=dict(default=None) + conn_limit=dict(type='int', default=None) )) module = AnsibleModule( argument_spec=argument_spec,