1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Added support for returning owner's group name in stat module #8967.

This commit is contained in:
Tongliang Liu 2014-09-11 13:31:07 -07:00
parent 1c3039f079
commit 68096c2744

View file

@ -66,6 +66,7 @@ import os
import sys
from stat import *
import pwd
import grp
def main():
module = AnsibleModule(
@ -140,6 +141,9 @@ def main():
pw = pwd.getpwuid(st.st_uid)
d['pw_name'] = pw.pw_name
grp_info = grp.getgrgid(pw.pw_gid)
d['gr_name'] = grp_info.gr_name
except:
pass