Note
This plugin is part of the community.general collection.
To install it use: ansible-galaxy collection install community.general.
To use it in a playbook, specify: community.general.dnsmadeeasy.
The below requirements are needed on the host that executes this module.
| Parameter | Choices/Defaults | Comments |
|---|---|---|
| account_key string / required | Account API Key. | |
| account_secret string / required | Account Secret Key. | |
| autoFailover boolean |
| If true, fallback to the primary IP address is manual after a failover. If false, fallback to the primary IP address is automatic after a failover. |
| contactList string / required | Default: "" | Name or id of the contact list that the monitor will notify. The default '' means the Account Owner. |
| domain string / required | Domain to work with. Can be the domain name (e.g. "mydomain.com") or the numeric ID of the domain in DNS Made Easy (e.g. "839989") for faster resolution | |
| failover boolean |
| If yes, add or change the failover. This is applicable only for A records. |
| httpFile string | The file at the Fqdn that the monitor queries for HTTP or HTTPS. | |
| httpFqdn string | The fully qualified domain name used by the monitor. | |
| httpQueryString string | The string in the httpFile that the monitor queries for HTTP or HTTPS. | |
| ip1 string | Primary IP address for the failover. Required if adding or changing the monitor or failover. | |
| ip2 string | Secondary IP address for the failover. Required if adding or changing the failover. | |
| ip3 string | Tertiary IP address for the failover. | |
| ip4 string | Quaternary IP address for the failover. | |
| ip5 string | Quinary IP address for the failover. | |
| maxEmails string / required | Default: 1 | Number of emails sent to the contact list by the monitor. |
| monitor boolean |
| If yes, add or change the monitor. This is applicable only for A records. |
| port string / required | Default: 80 | Port used by the monitor. |
| protocol string / required |
| Protocol used by the monitor. |
| record_name string | Record name to get/create/delete/update. If record_name is not specified; all records for the domain will be returned in "result" regardless of the state argument. | |
| record_ttl string | Default: 1800 | record's "Time to live". Number of seconds the record remains cached in DNS servers. |
| record_type string |
| Record type. |
| record_value string | Record value. HTTPRED: <redirection URL>, MX: <priority> <target name>, NS: <name server>, PTR: <target name>, SRV: <priority> <weight> <port> <target name>, TXT: <text value>" If record_value is not specified; no changes will be made and the record will be returned in 'result' (in other words, this module can be used to fetch a record's current id, type, and ttl) | |
| sandbox boolean |
| Decides if the sandbox API should be used. Otherwise (default) the production API of DNS Made Easy is used. |
| sensitivity string / required |
| Number of checks the monitor performs before a failover occurs where Low = 8, Medium = 5,and High = 3. |
| state string / required |
| whether the record should exist or not |
| systemDescription string / required | Default: "" | Description used by the monitor. |
| validate_certs boolean |
| If no, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
Note
- name: Fetch my.com domain records
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
register: response
- name: Create a record
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
- name: Update the previously created record
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_value: 192.0.2.23
- name: Fetch a specific record
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
register: response
- name: Delete a record
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
record_type: A
state: absent
record_name: test
- name: Add a failover
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
failover: True
ip1: 127.0.0.2
ip2: 127.0.0.3
- name: Add a failover
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
failover: True
ip1: 127.0.0.2
ip2: 127.0.0.3
ip3: 127.0.0.4
ip4: 127.0.0.5
ip5: 127.0.0.6
- name: Add a monitor
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
monitor: yes
ip1: 127.0.0.2
protocol: HTTP # default
port: 80 # default
maxEmails: 1
systemDescription: Monitor Test A record
contactList: my contact list
- name: Add a monitor with http options
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
monitor: yes
ip1: 127.0.0.2
protocol: HTTP # default
port: 80 # default
maxEmails: 1
systemDescription: Monitor Test A record
contactList: 1174 # contact list id
httpFqdn: http://my.com
httpFile: example
httpQueryString: some string
- name: Add a monitor and a failover
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
failover: True
ip1: 127.0.0.2
ip2: 127.0.0.3
monitor: yes
protocol: HTTPS
port: 443
maxEmails: 1
systemDescription: monitoring my.com status
contactList: emergencycontacts
- name: Remove a failover
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
failover: no
- name: Remove a monitor
community.general.dnsmadeeasy:
account_key: key
account_secret: secret
domain: my.com
state: present
record_name: test
record_type: A
record_value: 127.0.0.1
monitor: no
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/general/dnsmadeeasy_module.html