damex.cloudflare.cloudflare_email_routing role – Ensure Cloudflare email routing.
Note
This role is part of the damex.cloudflare collection (version 1.2.3).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it use: ansible-galaxy collection install damex.cloudflare.
To use it in a playbook, specify: damex.cloudflare.cloudflare_email_routing.
Entry point main – Ensure Cloudflare email routing.
Synopsis
Ensure Cloudflare email routing destination addresses, settings, and rules.
Parameters
Parameter |
Comments |
|---|---|
Cloudflare account API key. |
|
Cloudflare account email. |
|
Cloudflare account identifier. |
|
Cloudflare account name. |
|
Cloudflare API token. |
|
Destination email addresses to ensure. |
|
Email routing enabled state. Choices:
|
|
Default rule enabled state. Choices:
|
|
Default rule state. Choices:
|
|
Routing rules to ensure. |
|
Actions to take on matched email. |
|
Action type. Choices:
|
|
Action destination addresses. |
|
Rule enabled state. Choices:
|
|
Matching patterns. |
|
Matcher field. Choices:
|
|
Matcher type. Choices:
|
|
Matcher value. |
|
Rule name. |
|
Rule execution priority. |
|
Rule state. Choices:
|
|
Zone identifier. |
|
Zone domain name. |
Examples
- name: Ensure cloudflare email routing
hosts: all
tasks:
- name: Ensure cloudflare email routing
ansible.builtin.import_role:
name: damex.cloudflare.cloudflare_email_routing
vars:
cloudflare_email_routing_zone_name: example.com
cloudflare_email_routing_account_id: 023e105f4ecef8ad9ca31a8372d0c353
cloudflare_email_routing_api_token: "{{ cloudflare_api_token }}"
cloudflare_email_routing_destination_addresses:
- user@gmail.com
cloudflare_email_routing_rules:
- name: catch-all
matchers:
- type: all
actions:
- type: forward
value:
- user@gmail.com