W3cubDocs

/Ansible

sns - Send Amazon Simple Notification Service (SNS) messages

New in version 1.6.

Synopsis

The sns module sends notifications to a topic on your Amazon SNS account

Requirements (on host that executes module)

  • boto

Options

parameter required default choices comments
aws_access_key
no None
AWS access key. If not set then the value of the AWS_ACCESS_KEY environment variable is used.
aliases: ec2_access_key, access_key
aws_secret_key
no None
AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used.
aliases: ec2_secret_key, secret_key
email
no
Message to send to email-only subscription
http
no
Message to send to HTTP-only subscription
https
no
Message to send to HTTPS-only subscription
msg
yes
Default message to send.
aliases: default
region
no
The AWS region to use. If not specified then the value of the EC2_REGION environment variable, if any, is used.
aliases: aws_region, ec2_region
sms
no
Message to send to SMS-only subscription
sqs
no
Message to send to SQS-only subscription
subject
no
Subject line for email delivery.
topic
yes
The topic you want to publish to.

Examples

- name: Send default notification message via SNS
  local_action:
    module: sns
    msg: "{{ inventory_hostname }} has completed the play."
    subject: "Deploy complete!"
    topic: "deploy"

- name: Send notification messages via SNS with short message for SMS
  local_action:
    module: sns
    msg: "{{ inventory_hostname }} has completed the play."
    sms: "deployed!"
    subject: "Deploy complete!"
    topic: "deploy"

This is an Extras Module

For more information on what this means please read Extras Modules

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

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