All Projects → robertdebock → ansible-role-dns

robertdebock / ansible-role-dns

Licence: Apache-2.0 license
Install and configure dns on your system.

Programming Languages

Jinja
831 projects

Projects that are alternatives of or similar to ansible-role-dns

ansible-role-dsvpn
Install and configure dsvpn on your system.
Stars: ✭ 18 (-53.85%)
Mutual labels:  playbook, molecule, tox
ansible-role-tomcat
Install and configure tomcat on your system.
Stars: ✭ 34 (-12.82%)
Mutual labels:  playbook, molecule, tox
Ansible Role Bootstrap
Prepare your system to be managed by Ansible.
Stars: ✭ 106 (+171.79%)
Mutual labels:  playbook, molecule, tox
ansible-role-fail2ban
Install and configure fail2ban on your system.
Stars: ✭ 42 (+7.69%)
Mutual labels:  playbook, molecule, tox
ansible-role-rsyslog
Install and configure rsyslog on your system.
Stars: ✭ 14 (-64.1%)
Mutual labels:  playbook, molecule, tox
ansible-role-logrotate
Install and configure logrotate on your system.
Stars: ✭ 13 (-66.67%)
Mutual labels:  playbook, molecule, tox
ansible-fluentd
Provision fluentd log collector
Stars: ✭ 20 (-48.72%)
Mutual labels:  molecule, tox
Ansible Grafana
Platform for analytics and monitoring
Stars: ✭ 340 (+771.79%)
Mutual labels:  molecule, tox
Ansible Prometheus
Deploy Prometheus monitoring system
Stars: ✭ 758 (+1843.59%)
Mutual labels:  molecule, tox
Ansible Node Exporter
Provision basic metrics exporter for prometheus monitoring tool
Stars: ✭ 263 (+574.36%)
Mutual labels:  molecule, tox
Ansible Alertmanager
Deploy Prometheus Alertmanager service
Stars: ✭ 93 (+138.46%)
Mutual labels:  molecule, tox
ansible-haproxy
Ansible HAproxy role for Unified OpenStack Installer and others.
Stars: ✭ 35 (-10.26%)
Mutual labels:  playbook, molecule
ansible-coredns
Ansible provisioning of CoreDNS
Stars: ✭ 25 (-35.9%)
Mutual labels:  molecule, tox
zonemanager
Central DNS/DHCP database with replication to Amazon Route53, BIND, MikroTik routers and other services.
Stars: ✭ 29 (-25.64%)
Mutual labels:  dns, bind
ansible-snmp-exporter
Provision SNMP metrics exporter for prometheus monitoring
Stars: ✭ 18 (-53.85%)
Mutual labels:  molecule, tox
ansible-blackbox-exporter
Blackbox prober exporter
Stars: ✭ 60 (+53.85%)
Mutual labels:  molecule, tox
MooInfo
Visual implementation of OSHI, to view information about the system and hardware.
Stars: ✭ 83 (+112.82%)
Mutual labels:  system
ansible-taskrunner
Ansible Taskrunner - ansible-playbook wrapper with YAML-abstracted python click cli options!
Stars: ✭ 14 (-64.1%)
Mutual labels:  playbook
ansible-tinc
Role to install tinc in a star/ring topology (w/ leaf/spine) (based on your variables)
Stars: ✭ 15 (-61.54%)
Mutual labels:  molecule
mir-cpuid
BetterC CPU Identification Routines
Stars: ✭ 25 (-35.9%)
Mutual labels:  system

dns

Install and configure dns on your system.

GitHub GitLab Quality Downloads Version
github gitlab quality downloads Version

Example Playbook

This example is taken from molecule/default/converge.yml and is tested on each push, pull request and release.

---
- name: Converge
  hosts: all
  become: yes
  gather_facts: yes

  roles:
    - role: robertdebock.dns
      dns_port: 5353

The machine needs to be prepared. In CI this is done using molecule/default/prepare.yml:

---
- name: Prepare
  hosts: all
  gather_facts: no
  become: yes

  roles:
    - role: robertdebock.bootstrap
    - role: robertdebock.core_dependencies

Also see a full explanation and example on how to use these roles.

Role Variables

The default values for the variables are set in defaults/main.yml:

---
# defaults file for dns

# The port to listen on.
dns_port: 53

# Should the DNS server be a caching DNS server?
dns_caching_dns: yes

# A list of zones and properties per zone.
dns_zones:
  - name: localhost
    soa: localhost
    serial: 1
    refresh: 604800
    retry: 86400
    expire: 2419200
    ttl: 604800
    records:
      - name: "@"
        type: NS
        value: localhost.
      - name: "@"
        value: "127.0.0.1"
      - name: "@"
        type: AAAA
        value: "::1"

  - name: "127.in-addr.arpa"
    ttl: 604800
    records:
      - name: "@"
        type: NS
        value: localhost.
      - name: "1.0.0"
        type: PTR
        value: localhost.

  - name: "0.in-addr.arpa"
    records:
      - name: "@"
        type: NS
        value: localhost.

  - name: "255.in-addr.arpa"
    records:
      - name: "@"
        type: NS
        value: localhost.

  - name: example.com
    ttl: 604800
    ns:
      - name: dns1.example.com.
      - name: dns2.example.com.
    mx:
      - name: mail1.example.com.
        priority: 10
      - name: mail2.example.com.
        priority: 20
    records:
      - name: dns1
        value: "127.0.0.1"
      - name: dns2
        value: "127.0.0.1"
      - name: www
        value: "127.0.0.1"
      - name: dns1
        value: "127.0.0.1"
      - name: dns2
        value: "127.0.0.1"
      - name: mail1
        value: "127.0.0.1"
      - name: mail2
        value: "127.0.0.1"

  - name: forwarded.example.com
    type: forward
    dns_zone_forwarders:
      - "1.1.1.1"
      - "8.8.8.8"

# An optional list of acls to allow recursion. ("any" and "none" are always available.)
dns_allow_recursion:
  - none

# An optional list of IPv4 on which the DNS server will listen. ("any" and "none" are always available.)
dns_options_listen_on:
  - any

# A optional list of IPv6 on which the DNS server will listen. ("any" and "none" are always available.)
dns_options_listen_on_v6:
  - any

# An optional list of IP which are allowed to query the server. ("any" and "none" are always available.)
# Default: "any"
# dns_options_allow_query:
#  - any
#  - "127.0.0.1"

# An optional list of IP which are allowed to run a AXFR query. ("any" and "none" are always available.)
# Default: "none"
# dns_options_allow_transfer:
#   - none
#   - "172.16.0.1"

# An optional setting to configure the path where the pid file will be created.
dns_pid_file: /run/named/named.pid

# An optional setting to forward traffic to other DNS servers.
# dns_options_forwarders:
#   - "1.1.1.1"
#   - "8.8.8.8"

# Another example thanks to @blaisep.
# dns_zones:
#   - name: lab.controlplane.info
#     ttl: 600
#     ns:
#       - name: ns.lab.controlplane.info.
#     mx:
#       - name: mail1.lab.controlplane.info.
#         priority: 10
#       - name: mail2.lab.controlplane.info.
#         priority: 20
#     records:
#       - name: ns
#         value: "192.168.254.27"
#       - name: git
#         value: "192.168.254.19"
#       - name: dl380
#         value: "192.168.254.27"
#       - name: mail1
#         value: "192.168.123.123"
#       - name: mail2
#         value: "192.168.123.123"
#   - name: forwarded.lab.controlplane.info
#     ns:
#       - name: forwarded.lab.controlplane.info.
#     records:
#       - name: ns
#         value: "192.168.254.27"
#       - name: "@"
#         value: "192.168.123.123"
#     dns_zone_forwarders:
#       - "9.9.9.9"
#       - "8.8.8.8"

Requirements

Status of used roles

The following roles are used to prepare a system. You can prepare your system in another way.

Requirement GitHub GitLab
robertdebock.bootstrap Build Status GitHub Build Status GitLab
robertdebock.core_dependencies Build Status GitHub Build Status GitLab

Context

This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.

Here is an overview of related roles: dependencies

Compatibility

This role has been tested on these container images:

container tags
alpine all
amazon Candidate
el 8
debian all
fedora all
ubuntu all

The minimum version of Ansible required is 2.10, tests have been done to:

  • The previous version.
  • The current version.
  • The development version.

If you find issues, please register them in GitHub

License

Apache-2.0

Author Information

robertdebock

Please consider sponsoring me.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].