damex.cloudflare.cloudflare_email_routing module – Ensure Cloudflare email routing
Note
This module 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.
Synopsis
Ensures Cloudflare email routing is enabled or disabled for a zone, see the docs: https://developers.cloudflare.com/email-routing/.
Parameters
Parameter |
Comments |
|---|---|
Cloudflare account API key. Required together with |
|
Cloudflare account email. Required together with |
|
Cloudflare API token. Required if Can be specified in |
|
Email routing enabled state. Choices:
|
|
Zone identifier. Required if |
|
Zone domain name. Required if Resolved to zone identifier via the Cloudflare API. |
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full |
Supports check mode. |
|
Support: full |
Supports diff mode. |
Examples
- name: Ensure email routing is enabled
damex.cloudflare.cloudflare_email_routing:
zone_name: example.com
api_token: "{{ cloudflare_api_token }}"
enabled: true
- name: Ensure email routing is disabled
damex.cloudflare.cloudflare_email_routing:
zone_id: 023e105f4ecef8ad9ca31a8372d0c353
api_token: "{{ cloudflare_api_token }}"
enabled: false
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Email routing settings from the Cloudflare API. Returned: success |
|
Email routing enabled state. Returned: success |
|
Settings identifier. Returned: success |
|
Zone domain name. Returned: success |
|
Email routing status. Returned: success Sample: |