include_recipe 'resolver::default' if File.writable?('/etc/resolv.conf')

if node['resolver']['lock_resolver_conf']
  execute 'chattr-resolv-conf' do
    command 'chattr +i /etc/resolv.conf'
    not_if "lsattr /etc/resolv.conf | grep 'i'"
  end
end
