Thanks a lot dear.. I didn't knew about Shell module and had done the
task before your reply using a bash script. But its more simple with
Shell module which you introduced to me. Thanks again.
On Sat, Sep 15, 2018 at 8:41 PM S C Rigler <rigle...@gmail.com> wrote:
>
> I would use two tasks; one using the shell module to run the remote command 
> of your choice (tail, grep, whatever) and register the output to a variable, 
> then a second task using the mail module to send it to recipients.
>
> On Sat, Sep 15, 2018, 4:30 AM Bilal ahmed <bilalahmedawa...@gmail.com> wrote:
>>
>> Hi guys,
>>
>> I want to copy a specific line (say last one) from a file (any log file) and 
>> email it using Ansible playbook. Which module can I use for this?
>> Thanks in advance.
>>
>> BR,
>> Bilal AHMED
>>
>> --
>> 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 ansible-project+unsubscr...@googlegroups.com.
>> To post to this group, send email to ansible-project@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/04834adb-a20f-4454-9ac0-1f08809ae92b%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/CAFbiokf%2B%3DCseNh0yFAiOiUu6Tezb%3Dq8S6hQHELsO_Hs%2BbnKLfA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CADMA%3D7NSxmPSVd1z7OfKsJOyRF6%2BJ3%2BKkCTuidx51mcuhiwE5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to