cdalbergue.mandrill_routes

Ansible Mandrill 路由

这个角色帮助您从您的帐户创建 Mandrill 入站和路由。

需求

角色变量

默认变量:
mandrill_api_version: 1.0
mandrill_api_base_url: https://mandrillapp.com/api/{{mandrill_api_version}}
mandrill_api_inbounds_url: "{{ mandrill_api_base_url }}/inbound"
mandrill_api_output_format: .json
mandrill_inbound_key_operation: present # absent表示删除,check表示检查
mandrill_inbound_operation: add-domain
mandrill_inbounds_request_url: "{{ mandrill_api_inbounds_url }}/{{ mandrill_inbound_operation }}{{ mandrill_api_output_format }}"
mandrill_routes_operation: add-route
mandrill_routes_request_url: "{{ mandrill_api_inbounds_url }}/{{ mandrill_routes_operation }}{{ mandrill_api_output_format }}"

其他变量:
mandrill_api_key: myApiKey # 必需
mandrill_inbound_domain: example.com # 要创建路由的域名
mandrill_route_pattern: * # 您希望用于路由的模式
mandrill_route_url: https://example.com/webhook # 您希望重定向的 URL

依赖

示例剧本

创建域:

- hosts: localhost
  roles:
    - role: mandrill_routes
      vars:
        mandrill_api_key: yourApiKey
        mandrill_inbound_domain: your_company-reply.com
        mandrill_route_pattern: *
        mandrill_route_url: https://your_company.com/webhook

删除域路由

- hosts: localhost
  roles:
    - role: mandrill_routes
      vars:
        mandrill_route_operation: absent
        mandrill_api_key: yourApiKey
        mandrill_route_domain: your_company-reply.com

检查域

- hosts: localhost
  roles:
    - role: mandrill_routes
      vars:
        mandrill_route_operation: check
        mandrill_api_key: yourApiKey
        mandrill_route_domain: your_company-reply.com

许可证

BSD

作者信息

github.com/cdalbergue

安装
ansible-galaxy install cdalbergue.mandrill_routes
许可证
Unknown
下载
74