diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-07-19 12:37:05 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-07-19 12:37:05 -0700 |
commit | dc5aa2759006f7cdb58bd085d64e3a6051b3158e (patch) | |
tree | af0bc24e8e4e51169593c4e62fdb105b102674d9 /lib/chef/provider/file.rb | |
parent | 99c7bbf32fb3dbc1d9e80370a68b256b7e939e0d (diff) | |
download | chef-dc5aa2759006f7cdb58bd085d64e3a6051b3158e.tar.gz |
replace glibc resolver with ruby resolver
also wires up file providers to reload /etc/reoslv.conf when it changes.
Diffstat (limited to 'lib/chef/provider/file.rb')
-rw-r--r-- | lib/chef/provider/file.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/chef/provider/file.rb b/lib/chef/provider/file.rb index 7f85085eeb..ba08f0f236 100644 --- a/lib/chef/provider/file.rb +++ b/lib/chef/provider/file.rb @@ -154,6 +154,7 @@ class Chef do_contents_changes do_acl_changes do_selinux + do_resolv_conf_fixup load_resource_attributes_from_file(@new_resource) end @@ -445,6 +446,12 @@ class Chef end end + def do_resolv_conf_fixup + if new_resource.path == "/etc/resolv.conf" + Resolv::DefaultResolver.replace_resolvers [Resolv::DNS.new("/etc/resolv.conf")] + end + end + def do_acl_changes if access_controls.requires_changes? converge_by(access_controls.describe_changes) do |