*email.yml*
---
 - hosts: localhost
   tasks:
    - name: sending mail
      mail:
        host: "smtp.gmail.com"
        port: 25
        username: "[email protected]"
        password: "xxxxxxxxxxxxx"
        to: "[email protected]"
        subject: "Ansible-report"
        body: "Hello, this is an e-mail. I hope you like it ;-)"

This code is fine...but im getting error like this.......I tried 25,465.587 
ports

[root@ansible-hyd ~]# ansible-playbook email.yml

PLAY [localhost] 
***************************************************************

TASK [setup] 
*******************************************************************
ok: [localhost]

TASK [sending mail] 
************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": 
"Failed to send mail to server smtp.gmail.com on port 25: [Errno 101] 
Network is unreachable", "rc": 1}

NO MORE HOSTS LEFT 
*************************************************************
        to retry, use: --limit @email.retry

PLAY RECAP 
*********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1



*How to configure...Help me from this..*.

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/6fee3dc6-66df-47c5-9c4c-a240c486547d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to