From 963f6ff57b139555a6657c631737f3f30fe6ade7 Mon Sep 17 00:00:00 2001 From: Punicaa Date: Mon, 29 Jan 2024 12:28:21 +0100 Subject: [PATCH] [GH-27] Added support for sortlist resolv.conf option. (#78) --- CHANGELOG.md | 2 ++ templates/default/resolv.conf.erb | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 511cbfa..a666ce3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ This file is used to list changes made in each version of the resolver cookbook. ## Unreleased +- Added support for sortlist option in resolv.conf + ## 4.1.6 - *2023-12-21* ## 4.1.5 - *2023-10-03* diff --git a/templates/default/resolv.conf.erb b/templates/default/resolv.conf.erb index 7d59931..6f8ac91 100644 --- a/templates/default/resolv.conf.erb +++ b/templates/default/resolv.conf.erb @@ -9,6 +9,9 @@ domain <%= @domain %> <% unless nil_or_empty?(@search) -%> search <%= @search.join(' ') %> <% end -%> +<% unless nil_or_empty?(@sortlist) -%> +sortlist <%= @sortlist.join(' ') %> +<% end -%> <% @nameservers.each do |nameserver| -%> nameserver <%= nameserver %> <% end %>