Using numeric uid in become_user

10 views
Skip to first unread message

Gregory Morozov

unread,
Aug 9, 2017, 5:13:14 AM8/9/17
to Ansible Project
Hello,
I am getting a file list using find module.
For each file in the resulting list I need to perform certain action with become/become_user, user being the owner of the found file.
However find module (I guess stat as well) does not return owner username, but only owner numerical UID.
I tried to use UID in become_user in the form of  "#{{ item.uid}}", but it did not work.
What is the best way to approach this?

Thanks
Gregory


Gregory Morozov

unread,
Aug 10, 2017, 3:01:05 AM8/10/17
to Ansible Project
To clarify - I suspect do not get pw_name in find result value probably because these users are virtual and retrieved from mysql by nscd daemon. However system and and all software sees these usernames just fine.
Reply all
Reply to author
Forward
0 new messages