summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Weitzhofer <bernhard@weitzhofer.org>2013-04-01 12:44:22 +0200
committerBernhard Weitzhofer <bernhard@weitzhofer.org>2013-04-01 13:56:37 +0200
commit8456cb8e5244733fa8583cfb0ab5548a3d71fd1a (patch)
tree5f57be975e25bc3a500b395472062d0a3e9c490d
parent1ad61b3e19de06b361d96fc967ac98fd9878f3ae (diff)
downloadansible-8456cb8e5244733fa8583cfb0ab5548a3d71fd1a.tar.gz
postgresql_user: fix docstrings
Change documentation of "state" param to refer to user (role) state instead of database state. Change 2 function docstrings to reflect the code
-rw-r--r--library/postgresql_user6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/postgresql_user b/library/postgresql_user
index 53648d1455..597be84af3 100644
--- a/library/postgresql_user
+++ b/library/postgresql_user
@@ -86,7 +86,7 @@ options:
"[NO]INHERIT", "[NO]LOGIN", "[NO]REPLICATION" ]
state:
description:
- - The database state
+ - The user (role) state
required: false
default: present
choices: [ "present", "absent" ]
@@ -141,13 +141,13 @@ def user_exists(cursor, user):
def user_add(cursor, user, password, role_attr_flags):
- """Create a new user with write access to the database"""
+ """Create a new database user (role)."""
query = "CREATE USER \"%(user)s\" with PASSWORD '%(password)s' %(role_attr_flags)s"
cursor.execute(query % {"user": user, "password": password, "role_attr_flags": role_attr_flags})
return True
def user_alter(cursor, user, password, role_attr_flags):
- """Change user password"""
+ """Change user password and/or attributes. Return True if changed, False otherwise."""
changed = False
if user == 'PUBLIC':