Skip to content

idiv-biodiversity/ansible-role-systemd-resolved

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: systemd-resolved

An Ansible role that configures systemd-resolved.

Table of Contents

Requirements

  • Ansible 2.9

Role Variables

Define your DNS servers:

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

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

Define your domains:

systemd_resolved_domains:
  - example.com

Other variables in the order they show up 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 information, read man 5 resolved.conf.

Dependencies

  • collection ansible.posix

Example Playbook

Add to requirements.yml:

---

roles:

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

...

Download:

$ ansible-galaxy install -r requirements.yml

Top-Level Playbook

Write a top-level playbook:

---

- name: head server
  hosts: head

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

...

Role Dependency

Define the role dependency in meta/main.yml:

---

dependencies:

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

...

License

MIT

Author Information

This role was created in 2019 by Christian Krause aka wookietreiber at GitHub, HPC cluster systems administrator at the German Centre for Integrative Biodiversity Research (iDiv).