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
001e2e56
Commit
001e2e56
authored
Nov 10, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1590 from romeotheriault/minor-freebsd-user-module-fixes
minor freebsd user fixes
parents
80f196fd
6c6bcff4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
library/user
+4
-4
No files found.
library/user
View file @
001e2e56
...
...
@@ -551,7 +551,7 @@ class FreeBsdUser(User):
# create the user
(
rc
,
out
,
err
)
=
self
.
execute_command
(
cmd
)
if
rc
is
not
None
and
rc
!=
0
:
module
.
fail_json
(
name
=
self
.
name
,
msg
=
err
,
rc
=
rc
)
self
.
module
.
fail_json
(
name
=
self
.
name
,
msg
=
err
,
rc
=
rc
)
# we have to set the password in a second command
if
self
.
password
is
not
None
:
...
...
@@ -600,7 +600,7 @@ class FreeBsdUser(User):
groups
=
self
.
groups
.
split
(
','
)
for
g
in
groups
:
if
not
self
.
group_exists
(
g
):
module
.
fail_json
(
msg
=
"Group
%
s does not exist"
%
(
g
))
self
.
module
.
fail_json
(
msg
=
"Group
%
s does not exist"
%
(
g
))
group_diff
=
set
(
sorted
(
current_groups
))
.
symmetric_difference
(
set
(
sorted
(
groups
)))
groups_need_mod
=
False
...
...
@@ -618,14 +618,14 @@ class FreeBsdUser(User):
cmd
.
append
(
'-G'
)
new_groups
=
groups
if
self
.
append
:
new_groups
.
app
end
(
current_groups
)
new_groups
.
ext
end
(
current_groups
)
cmd
.
append
(
','
.
join
(
new_groups
))
# modify the user if cmd will do anything
if
cmd_len
!=
len
(
cmd
):
(
rc
,
out
,
err
)
=
self
.
execute_command
(
cmd
)
if
rc
is
not
None
and
rc
!=
0
:
module
.
fail_json
(
name
=
self
.
name
,
msg
=
err
,
rc
=
rc
)
self
.
module
.
fail_json
(
name
=
self
.
name
,
msg
=
err
,
rc
=
rc
)
else
:
(
rc
,
out
,
err
)
=
(
None
,
''
,
''
)
...
...
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