-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
enhancementissues that request a enhancementissues that request a enhancement
Description
Description
Currently, if I want to create an A record for a.b.example.com, I have to iterate through the list of domains to decide if it should be name=a,domain=b.example.com or name=a.b,domain=example.com
This feature request is that the domain should be optional. If it is missing, the list of domains is searched for the longest tail match for the fqdn in the name field. Of course, if there is no match, then return a "domain is required" error.
The idea is that we have variables that are just arrays of fqdn's, some of which are domain apex, some subdomains, and some subsubdomains, and there is no good way to calculate in ansible what domain to use unless the calculation can be done within the module.
New/Affected Components
linode.cloud.domain_record
Example Ansible Config
Thus these would work:
- name: Create an A record with name="", assuming domain my-domain.com exists.
linode.cloud.domain_record:
name: my-domain.com
type: 'A'
target: '127.0.0.1'
state: present
- name: Create an A record in domain b.my-domain.com, if it exists, otherwise in domain my-domain.com with name "a.b".
linode.cloud.domain_record:
name: a.b.my-domain.com
type: 'A'
target: '127.0.0.1'
state: presentMetadata
Metadata
Assignees
Labels
enhancementissues that request a enhancementissues that request a enhancement