idiv_biodiversity.systemd_resolved

Ansible Role: systemd-resolved

This is an Ansible role that sets up systemd-resolved.

Table of Contents

Requirements

  • Ansible version 2.9 or higher

Role Variables

You can define your DNS servers like this:

systemd_resolved_servers:
  - a.b.c.1
  - a.b.c.2

systemd_resolved_fallback_servers:
  - d.e.f.1
  - d.e.f.2

You can also specify your domains:

systemd_resolved_domains:
  - example.com

Other variables that you can configure, along with their default values:

systemd_resolved_dnssec: no
systemd_resolved_dns_over_tls: no
systemd_resolved_multicast_dns: yes
systemd_resolved_llmnr: yes
systemd_resolved_cache: yes
systemd_resolved_cache_from_localhost: no
systemd_resolved_dns_stub_listener: yes
systemd_resolved_dns_stub_listener_extra: ''
systemd_resolved_read_etc_hosts: yes
systemd_resolved_resolve_unicast_single_label: no
systemd_resolved_stale_retention_sec: 0

For more details, check man 5 resolved.conf.

Dependencies

  • You need the ansible.posix collection.

Example Playbook

First, add the role to requirements.yml:

---

roles:

  - name: idiv_biodiversity.systemd_resolved
    src: https://github.com/idiv-biodiversity/ansible-role-systemd-resolved
    version: v1.2.0

...

Then, download the role:

$ ansible-galaxy install -r requirements.yml

Top-Level Playbook

Create a top-level playbook like this:

---

- name: head server
  hosts: head

  roles:
    - role: idiv_biodiversity.systemd_resolved
      tags:
        - systemd-resolved

...

Role Dependency

To define the role dependency, add it to meta/main.yml:

---

dependencies:

  - role: idiv_biodiversity.systemd_resolved
    tags:
      - systemd-resolved

...

License

MIT License

Author Information

This role was created in 2019 by Christian Krause, also known as wookietreiber on GitHub, a systems administrator at the German Centre for Integrative Biodiversity Research (iDiv).

Informazioni sul progetto

install and configure systemd-resolved

Installa
ansible-galaxy install idiv_biodiversity.systemd_resolved
Licenza
mit
Download
399