lunik.coredns

Ansible Role: CoreDNS

MIT licensed
Galaxy Role
Downloads

This role installs CoreDNS on Linux and sets up the service along with DNS zones.

Requirements

There are no special requirements.

Role Variables

Variable Type Description
coredns_version string The version of CoreDNS to be installed
coredns_dns_port number The port where the CoreDNS service listens
coredns_forwarders list(string) A list of DNS servers to ask if CoreDNS doesn’t have the answer
coredns_acls list(object) ACLs defining who can or cannot make DNS queries through CoreDNS
coredns_zones list(object) A list of DNS zones that the CoreDNS server manages
coredns_cache_prefetch object Settings for prefetch caching with the CoreDNS cache plugin
coredns_cache_serve_stale object Settings for serving stale cache data with the CoreDNS cache plugin
coredns_ttl object Settings for Time to Live (TTL) of caches in the CoreDNS cache plugin

ACL

This section describes how to set up the CoreDNS acl plugin using the coredns_acls variable.
An ACL specifically determines who can or cannot make DNS queries using CoreDNS.

Each ACL has these attributes:

Attribute Type Description
cidr string An IP CIDR (like @IP or a range)
action string Action taken when a client from that CIDR makes a query

Zone

This section explains how to configure DNS zones with the CoreDNS file plugin using the coredns_zones variable.
Each zone has the following attributes:

Attribute Type Description
name string The name of the DNS zone
zone string Hostname of the zone (e.g., example.org)
file string The name of the file containing the zone data
template string Path to the template file for the zone data

Dependencies

There are no dependencies.

Example Playbook

- hosts: localhost
  vars:
    coredns_forwarders:
      - 9.9.9.9
    coredns_acls:
      - cidr: 192.168.0.0/24
        action: allow
    coredns_zones:
      - name: my-zone
        zone: my-zone.fr
        file: db.my-zone.fr
        template: templates/dbs/my-zone.fr
  roles:
    - lunik.coredns

License

MIT

Author Information

This role was created in 2019 by Lunik (Guillaume MARTINEZ).

Maintainer(s)

Informazioni sul progetto

Install and configure CoreDNS service

Installa
ansible-galaxy install lunik.coredns
Licenza
mit
Download
135
Proprietario
Ansible, GitLab, k8s/helm, Terraform, OCI Contributor