New in version 1.6.
The sns module sends notifications to a topic on your Amazon SNS account
| 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. |
- 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"
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