Skip to content

joey-grant/community.dns

 
 

Repository files navigation

Community DNS Collection

Documentation CI Public Suffix List up-to-date Codecov REUSE status

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.

Tested with Ansible

Tested with the current ansible-core 2.14, ansible-core 2.15, ansible-core 2.16, and ansible-core 2.17 releases and the current development version of ansible-core. Ansible versions before 2.9.10 are not supported.

External requirements

Depends on the plugin or module used.

Collection Documentation

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.

Included content

  • 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".

Using this collection

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.

Contributing to this collection

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.

Release notes

See the changelog.

Releasing, Versioning and Deprecation

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.

More information

Licensing

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.

About

Ansible modules and plugins for working with DNS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Shell 0.1%