Hello Matt,
Thanks a lot for your input, Really Appreciated!
I tried to make the changes in my playbook as per below -
---
- hosts: localhost
tasks:
- uri:
url: curl -X POST https://rest.nexmo.com/sms/json \
- name: Send notification message via Nexmo
nexmo:
api_key: b6xxxxx \
api_secret: 57xxxxxxxxx \
src: +918793161930 \
dest: +919168635888 \
msg: 'Hello from Nishant via Ansible'
validate_certs: no
delegate_to: localhost
~
Below is the error -
fatal: [localhost]: FAILED! => {"changed": false, "content": "", "failed":
true, "msg": "Status code was not [200]: Request failed: <urlopen error
unknown url type: curl -x post https>", "redirected": false, "status": -1,
"url": "curl -X POST https://rest.nexmo.com/sms/json \\"}
to retry, use: --limit @/home/capio/ansible/playbooks/Sms.retry
It will be great if you can please share the playbook , that you tried. I
can refer that to make changes in my playbook. I am not sure exactly where
i am getting the things wrong.
Please let me know if you need any more inputs from me.
Thanks again!
On Tuesday, 6 June 2017 20:38:41 UTC+5:30, Matt Martz wrote:
>
> I've just tested this module to validate that it is working correctly, and
> it seems to be.
>
> I'm not sure what specific issue you are running into.
>
> I might suggest following the example on the getting started page for
> Nexmo, and using your same data:
>
> curl -X POST https://rest.nexmo.com/sms/json \
> -d api_key=640c8a53 \
> -d api_secret=0ce239a6 \
> -d to=919168694888 \
> -d from=8793161930 \
> -d text="Hello from Nexmo"
>
> Of course, you need to replace api_key and api_secret with your key and
> secret.
>
>
> On Tue, Jun 6, 2017 at 9:27 AM, nishant bawane <[email protected]
> <javascript:>> wrote:
>
>> Is there any soln to overcome this error, please suggest the right forum
>> to ask this question, if this is not the correct forum.
>>
>> On Tuesday, 23 May 2017 16:50:06 UTC+5:30, nishant bawane wrote:
>>>
>>>
>>> Below is the playbook which is used to send the messages to the
>>> registered numbers using nexmo. Please suggests what needs to be done to
>>> overcome this error - No which i used are registered one and same with the
>>> api inputs.
>>>
>>> ---
>>> - hosts: localhost
>>> tasks:
>>> - name: Send notification message via Nexmo
>>> nexmo:
>>> api_key: 640c8a53
>>> api_secret: 0ce239a6
>>> src: 8793161930
>>> dest:
>>> - 919168694888
>>> msg: 'Hello from Ansible'
>>> validate_certs: no
>>> delegate_to: localhost
>>>
>>> Below is the playbook error -
>>>
>>> TASK [Send notification message via Nexmo]
>>> ************************************
>>> fatal: [localhost -> localhost]: FAILED! => {"changed": false,
>>> "failed":true, "msg": "One or messages failed to send", "responses":
>>> {"919168694888": {"failed": true}}}
>>> to retry, use: --limit @/home/capio/ansible/playbooks/sms.retry
>>>
>>>
>>> --
>> 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] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/ansible-project/79807af6-c04d-4dad-9a37-6ea71c7ab9b5%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/ansible-project/79807af6-c04d-4dad-9a37-6ea71c7ab9b5%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Matt Martz
> @sivel
> sivel.net
>
--
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/9ff77e62-0fd8-463c-a9e0-312ddb4b21a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.