Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
f5b9e4de
Commit
f5b9e4de
authored
Apr 01, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2543 from b6d/postgresql_user-docfix
postgresql_user: fix docstrings
parents
1ad61b3e
8456cb8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
library/postgresql_user
+3
-3
No files found.
library/postgresql_user
View file @
f5b9e4de
...
...
@@ -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'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment