Code Monkey home page Code Monkey logo

knot-resolver's Introduction

Knot Resolver with Ansible

An Ansible role that installs a Knot Resolver service.

This code is for training purposes and not production ready.

Description

We use the Ansible config management system to automate installation of a service.

Configuration is done by a template, which includes the primary IP addresses of the target system.

The whole process is automatically tested by Molecule. It runs on Docker to make tests quick.

The complicated part is where we run systemd inside a container to test the service supervisor.

Preparation

We need to build a custom Docker image first. Inside the role/knot-resolver/molecule directory run the following:

docker build -t debian-systemd:10 .

Usage

The whole building and testing process is automated in a single command. Go to the role/knot-resolver directory and run:

molecule test

Development

Change the Ansible files freely and have Molecule apply them again with the following command:

molecule converge

Role Variables

kresd_instances the number of service instances to start (default: 2) kresd_cachesize size of the persisent resolver cache in MB (default: 100) kresd_prefix_ip4 restrict access to this IPv4 prefix (default: none) kresd_prefix_ip6 restrict access to this IPv6 prefix (default: none)

Example Playbook

- hosts: dns-resolvers
  roles:
    - role: knot-resolver
      vars:
        kresd_instances: 3
        kresd_cachesize: 200
        kresd_prefix_ip4: 192.168.0.0/16
        kresd_prefix_ip4: fd00:1::/64

License

MIT License

Author Information

Freifunk Düsseldorf e.V. [email protected]

knot-resolver's People

Contributors

dependabot[bot] avatar nomaster avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.