Thanks Dick. I managed to get it working with the shell command. Im not 
sure is using the getent module, I would have been able to loop through it 
though. From what I read it seemed to lookup usernames and other data 
related to a particular key/user.

Thanks though.

On Friday, 5 March 2021 at 19:06:58 UTC [email protected] wrote:

> Did you look at 
>
> https://docs.ansible.com/ansible/latest/collections/ansible/builtin/getent_module.html
>  
> ?
>
> On Fri, 5 Mar 2021 at 18:20, danish09 <[email protected]> wrote:
>
>> Hi,
>>
>> Using ansible 2.4.0 on controller.
>>
>> Remote is an ubuntu 14.04 LTS.
>>
>> Python 2.7
>>
>> I am trying to cat through passwd file, awk the first column, register 
>> that into a variable and then create a compressed archive of a remote dir 
>> based on that username.
>>
>> I have read about using lookups, simple shell module, slurp but I cannot 
>> figure out how to do this on the remote host.
>>
>> Can you please help me out with this?
>>
>> Do let me know if you need any further information.
>>
>> Thanks
>>
>> Danish
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ansible Project" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/a028e9bb-4b45-4805-a17b-d1953b8fe13an%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/a028e9bb-4b45-4805-a17b-d1953b8fe13an%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> -- 
> Sent from a mobile device - please excuse the brevity, spelling and 
> punctuation.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1d692f6c-8256-48a6-9068-62bfa3c47072n%40googlegroups.com.

Reply via email to