community.general.catapult (8.5.0) — module

Send a sms / mms using the catapult bandwidth api

Authors: Jonathan Mainguy (@Jmainguy)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

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

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Send a mms to multiple users
  community.general.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 }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Send a sms to a single user
  community.general.catapult:
    src: "+15035555555"
    dest: "+12018994225"
    msg: "Consider yourself notified"
    user_id: "{{ user_id }}"
    api_token: "{{ api_token }}"
    api_secret: "{{ api_secret }}"

Inputs

    
msg:
    description:
    - The contents of the text message (must be 2048 characters or less).
    required: true
    type: str

src:
    description:
    - One of your catapult telephone numbers the message should come from (must be in
      E.164 format, like V(+19195551212)).
    required: true
    type: str

dest:
    description:
    - The phone number or numbers the message should be sent to (must be in E.164 format,
      like V(+19195551212)).
    elements: str
    required: true
    type: list

media:
    description:
    - For MMS messages, a media url to the location of the media to be sent with the message.
    type: str

user_id:
    description:
    - User Id from Api account page.
    required: true
    type: str

api_token:
    description:
    - Api Token from Api account page.
    required: true
    type: str

api_secret:
    description:
    - Api Secret from Api account page.
    required: true
    type: str

Outputs

changed:
  description: Whether the api accepted the message.
  returned: always
  sample: true
  type: bool