This repository contains the community.dns
Ansible Collection. The collection includes plugins and modules to work with DNS.
Please note that this collection does not support Windows targets.
We follow Ansible Code of Conduct in all our interactions within this project.
If you encounter abusive behavior violating the Ansible Code of Conduct, please refer to the policy violations section of the Code of Conduct for information on how to raise a complaint.
-
Join the Ansible forum:
- Get Help: get help or help others. Please add appropriate tags if you start new discussions, for example the
dns
tag. - Posts tagged with 'dns': subscribe to participate in DNS related conversations.
- Social Spaces: gather and interact with fellow enthusiasts.
- News & Announcements: track project-wide announcements including social events.
- Get Help: get help or help others. Please add appropriate tags if you start new discussions, for example the
-
The Ansible Bullhorn newsletter: used to announce releases and important changes.
For more information about communication, see the Ansible communication guide.
Tested with the current ansible-core 2.14, ansible-core 2.15, ansible-core 2.16, ansible-core 2.17, and ansible-core 2.18 releases and the current development version of ansible-core. Ansible versions before 2.9.10 are not supported.
Depends on the plugin or module used.
Browsing the latest collection documentation will show docs for the latest version released in the Ansible package, not the latest version of the collection released on Galaxy.
Browsing the devel collection documentation shows docs for the latest version released on Galaxy.
We also separately publish latest commit collection documentation which shows docs for the latest commit in the main
branch.
If you use the Ansible package and do not update collections independently, use latest. If you install or update this collection directly from Galaxy, use devel. If you are looking to contribute, use latest commit.
- Modules:
hetzner_dns_record_info
: retrieve information on DNS records from Hetzner DNS.hetzner_dns_record
: create/update/delete single DNS records with Hetzner DNS.hetzner_dns_record_set_info
: retrieve information on DNS record sets from Hetzner DNS.hetzner_dns_record_set
: create/update/delete DNS record sets with Hetzner DNS.hetzner_dns_record_sets
: bulk synchronize DNS record sets in Hetzner DNS service.hetzner_dns_zone_info
: retrieve zone information from Hetzner DNS.hosttech_dns_record_info
: retrieve information on DNS records from HostTech DNS.hosttech_dns_record
: create/update/delete single DNS records with HostTech DNS.hosttech_dns_record_set_info
: retrieve information on DNS record sets from HostTech DNS.hosttech_dns_record_set
: create/update/delete DNS record sets with HostTech DNS.hosttech_dns_record_set
: bulk synchronize DNS record sets in Hosttech DNS service.hosttech_dns_zone_info
: retrieve zone information from HostTech DNS.nameserver_info
: Look up nameservers for a DNS name.nameserver_record_info
: Look up all records of a type from all nameservers for a DNS name.wait_for_txt
: wait for TXT records to propagate to all name servers.
- Lookup plugins:
lookup
: look up DNS records and return them as a list of strings.lookup_as_dict
: look up DNS records and return them as a list of dictionaries.
- Inventory plugins:
hetzner_dns_records
: create inventory from Hetzner DNS records.hosttech_dns_records
: create inventory from HostTech DNS records.
- Filters:
get_public_suffix
: given a domain name, returns the public suffix. For example,"www.ansible.com" | community.dns.get_public_suffix == ".com"
and"some.random.prefixes.ansible.co.uk" | community.dns.get_public_suffix == ".co.uk"
.get_registrable_domain
: given a domain name, returns the registrable domain name (also called registered domain name). For example,"www.ansible.com" | community.dns.get_registrable_domain == "ansible.com"
and"some.random.prefixes.ansible.co.uk" | community.dns.get_registrable_domain == "ansible.co.uk"
.remove_public_suffix
: given a domain name, returns the part before the public suffix. For example,"www.ansible.com" | community.dns.remove_public_suffix == "www.ansible"
and"some.random.prefixes.ansible.co.uk" | community.dns.remove_public_suffix == "some.random.prefixes.ansible"
.remove_registrable_domain
: given a domain name, returns the part before the DNS zone. For example,"www.ansible.com" | community.dns.remove_registrable_domain == "www"
and"some.random.prefixes.ansible.co.uk" | community.dns.remove_registrable_domain == "some.random.prefixes"
.quote_txt
: quotes a string for use as a TXT record entry. For example,"this is a test" | community.dns.quote_txt == '"this is a test"'
.unquote_txt
: unquotes a TXT record entry. For example,'"foo" "bar"' | community.dns.unquote_txt == "foobar"
.
Before using the General community collection, you need to install the collection with the ansible-galaxy
CLI:
ansible-galaxy collection install community.dns
You can also include it in a requirements.yml
file and install it via ansible-galaxy collection install -r requirements.yml
using the format:
collections:
- name: community.dns
See Ansible Using collections for more details.
If you want to develop new content for this collection or improve what is already here, the easiest way to work on the collection is to clone it into one of the configured COLLECTIONS_PATH
, and work on it there.
See TESTING.md for information on running the tests.
You can find more information in the developer guide for collections, and in the Ansible Community Guide.
See the changelog.
This collection follows Semantic Versioning. More details on versioning can be found in the Ansible docs.
We plan to regularly release new minor or bugfix versions once new features or bugfixes have been implemented.
Releasing the current major version happens from the main
branch. We will create a stable-1
branch for 1.x.y versions once we start working on a 2.0.0 release, to allow backporting bugfixes and features from the 2.0.0 branch (main
) to stable-1
. A stable-2
branch will be created once we work on a 3.0.0 release, and so on.
We currently are not planning any deprecations or new major releases like 2.0.0 containing backwards incompatible changes. If backwards incompatible changes are needed, we plan to deprecate the old behavior as early as possible. We also plan to backport at least bugfixes for the old major version for some time after releasing a new major version. We will not block community members from backporting other bugfixes and features from the latest stable version to older release branches, under the condition that these backports are of reasonable quality.
- Ansible Collection overview
- Ansible User guide
- Ansible Developer guide
- Ansible Collections Checklist
- Ansible Community code of conduct
- The Bullhorn (the Ansible Contributor newsletter)
- Changes impacting Contributors
This collection is primarily licensed and distributed as a whole under the GNU General Public License v3.0 or later.
See LICENSES/GPL-3.0-or-later.txt for the full text.
The only content of this collection that is not GPL v3.0+ licensed is plugins/public_suffix_list.dat
, which is subject to the terms of the Mozilla Public License, v. 2.0. See LICENSES/MPL-2.0.txt for the full text.
All files have a machine readable SDPX-License-Identifier:
comment denoting its respective license(s) or an equivalent entry in an accompanying .license
file. Only changelog fragments (which will not be part of a release) are covered by a blanket statement in .reuse/dep5
. This conforms to the REUSE specification.