W3cubDocs

/Ansible

catapult - Send a sms / mms using the catapult bandwidth api

New in version 2.4.

Synopsis

  • Allows notifications to be sent using sms / mms via the catapult bandwidth api.

Options

parameter required default choices comments
api_secret
yes
Api Secret from Api account page.
api_token
yes
Api Token from Api account page.
dest
yes
The phone number or numbers the message should be sent to (must be in E.164 format, like +19195551212).
media
no
For MMS messages, a media url to the location of the media to be sent with the message.
msg
yes
The contents of the text message (must be 2048 characters or less).
src
yes
One of your catapult telephone numbers the message should come from (must be in E.164 format, like +19195551212).
user_id
yes
User Id from Api account page.

Examples

- name: Send a mms to multiple users
  catapult:
    src: "+15035555555"
    dest:
      - "+12525089000"
      - "+12018994225"
    media: "http://example.com/foobar.jpg"
    msg: "Task is complete"
    user_id: "{{ user_id }}"
    api_token: "{{ api_token }}"
    api_secret: "{{ api_secret }}"

- name: Send a sms to a single user
  catapult:
    src: "+15035555555"
    dest: "+12018994225"
    msg: "Consider yourself notified"
    user_id: "{{ user_id }}"
    api_token: "{{ api_token }}"
    api_secret: "{{ api_secret }}"

Return Values

Common return values are documented here Return Values, the following are the fields unique to this module:

name description returned type sample
changed
Whether the api accepted the message.
always boolean True

Notes

Note

  • Will return changed even if the media url is wrong.
  • Will return changed if the destination number is invalid.

Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.

© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/catapult_module.html