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
68096c27
Commit
68096c27
authored
Sep 11, 2014
by
Tongliang Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for returning owner's group name in stat module #8967.
parent
1c3039f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
library/files/stat
+4
-0
No files found.
library/files/stat
View file @
68096c27
...
@@ -66,6 +66,7 @@ import os
...
@@ -66,6 +66,7 @@ import os
import
sys
import
sys
from
stat
import
*
from
stat
import
*
import
pwd
import
pwd
import
grp
def
main
():
def
main
():
module
=
AnsibleModule
(
module
=
AnsibleModule
(
...
@@ -140,6 +141,9 @@ def main():
...
@@ -140,6 +141,9 @@ def main():
pw
=
pwd
.
getpwuid
(
st
.
st_uid
)
pw
=
pwd
.
getpwuid
(
st
.
st_uid
)
d
[
'pw_name'
]
=
pw
.
pw_name
d
[
'pw_name'
]
=
pw
.
pw_name
grp_info
=
grp
.
getgrgid
(
pw
.
pw_gid
)
d
[
'gr_name'
]
=
grp_info
.
gr_name
except
:
except
:
pass
pass
...
...
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