| Author: | Michael J. Schultz |
|---|
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. | |
| aws_secret_key | no | None | AWS secret key. If not set then the value of the AWS_SECRET_KEY environment variable is used. | |
| 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. | ||
| region | no | The AWS region to use. If not specified then the value of the EC2_REGION environment variable, if any, is used. | ||
| 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. |
Note
Requires boto
- 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"