From c7e3b2d9ac0d33cefb3801622817525b0138c3c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Dubois?= Date: Wed, 15 Mar 2023 15:55:41 +0100 Subject: [PATCH] base: set the lookup option so that resolv.conf searches /etc/hosts before querying a domain name server; the default is the opposite --- CHANGELOG | 1 + roles/base/tasks/main.yml | 1 + roles/base/tasks/resolvconf.yml | 11 +++++++++++ 3 files changed, 13 insertions(+) create mode 100644 roles/base/tasks/resolvconf.yml diff --git a/CHANGELOG b/CHANGELOG index b52ada9..275dbf3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * nagios-nrpe: add some information in check_connections_state.sh check * ospf: precise in the readme file that no daemon is configured/activated * logsentry: delete unused default file that we put in /usr/share/scripts +* base: set the lookup option so that resolv.conf searches /etc/hosts before querying a domain name server; the default is the opposite ### Changed diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml index b0a3422..f88cd54 100644 --- a/roles/base/tasks/main.yml +++ b/roles/base/tasks/main.yml @@ -1,5 +1,6 @@ --- # tasks file for evobsd-base +- include: resolvconf.yml - include: packages.yml - include: doas.yml - include: dotfiles.yml diff --git a/roles/base/tasks/resolvconf.yml b/roles/base/tasks/resolvconf.yml new file mode 100644 index 0000000..1472ca2 --- /dev/null +++ b/roles/base/tasks/resolvconf.yml @@ -0,0 +1,11 @@ +--- +- name: "Configure resolv.conf" + lineinfile: + path: /etc/resolv.conf + line: "lookup file bind" + insertbefore: BOF + owner: root + group: wheel + mode: "0644" + tags: + - resolvconf