damex.cloudflare.cloudflare_email_routing_address module – Ensure Cloudflare email routing destination address
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_address.
Synopsis
Ensures Cloudflare email routing destination addresses, see the docs: https://developers.cloudflare.com/email-routing/.
Destination addresses must be verified before they can be used in routing rules.
Creating an address triggers a verification email.
Parameters
Parameter |
Comments |
|---|---|
Cloudflare account API key. Required together with |
|
Cloudflare account email. Required together with |
|
Cloudflare account identifier. Required if |
|
Cloudflare account name. Required if Resolved to account identifier via the Cloudflare API. |
|
Cloudflare API token. Required if Can be specified in |
|
Destination email address. |
|
Destination address state. Choices:
|
Attributes
Attribute |
Support |
Description |
|---|---|---|
Support: full |
Supports check mode. |
|
Support: full |
Supports diff mode. |
Examples
- name: Ensure destination address
damex.cloudflare.cloudflare_email_routing_address:
email: user@gmail.com
account_id: 023e105f4ecef8ad9ca31a8372d0c353
api_token: "{{ cloudflare_api_token }}"
- name: Ensure destination address is absent
damex.cloudflare.cloudflare_email_routing_address:
email: old@gmail.com
account_id: 023e105f4ecef8ad9ca31a8372d0c353
api_token: "{{ cloudflare_api_token }}"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
Destination address object from the Cloudflare API. Returned: when state is present |
|
Destination email address. Returned: success |
|
Address identifier. Returned: success |
|
Verification timestamp, null if not yet verified. Returned: success |