Inchdev.mandrill_webhook
mandrill_webhook
这个角色帮助您创建或删除您的帐户中的 mandrill webhook。 https://mandrillapp.com/api/docs/webhooks.curl.html
要求
无
角色变量
可以传递给此角色的变量及其简要描述如下:
默认变量:
mandrill_api_version: 1.0
mandrill_api_webhook_url: https://mandrillapp.com/api/{{mandrill_api_version}}/webhooks
mandrill_api_output_format: .json
mandrill_webhook_operation: present # present 表示创建 webhook,absent 表示删除
mandrill_operation: add # 内部使用
mandrill_request_url: "{{mandrill_api_webhook_url}}/{{mandrill_operation}}{{mandrill_api_output_format}}"
mandrill_webhook_description: 通过 ansible 生成
其他变量:
mandrill_webhook_id: 51 # 删除时需要
mandrill_api_key: myApiKey # 必填
mandrill_webhook_url: http://example.com/mandrill_webhook
# 用于配置 mandrill webhook 的操作数组
mandrill_webhook_events:
- click
- open
依赖
无
示例剧本
---
- hosts: local
roles:
- role: mandrill_webhook
vars:
mandrill_webhook_id: 51
mandrill_api_key: myApiKey
mandrill_webhook_operation: absent
---
- hosts: local
roles:
- role: mandrill_webhook
vars:
mandrill_webhook_url: http://example.com/mandrill_webhook
mandrill_webhook_description: 很棒的 webhook
mandrill_api_key: myApiKey
许可证
BSD