Add a logic to customize resolv.conf for LXC containers.

This commit is contained in:
Kazuhiro MUSASHI 2025-01-19 22:13:55 +09:00
parent 88bb60ea9a
commit 6b53c30a77

View File

@ -8,8 +8,10 @@ end
case run_command('grep VERSION_ID /etc/os-release | awk -F\" \'{print $2}\'').stdout.chomp
when "24.04"
execute "change link to /etc/resolv.conf" do
command "ln -fs /run/systemd/resolve/resolv.conf /etc/resolv.conf"
unless node['base']['lxc']
execute "change link to /etc/resolv.conf" do
command "ln -fs /run/systemd/resolve/resolv.conf /etc/resolv.conf"
end
end
directory "/etc/systemd/resolved.conf.d/" do