Add more secure sudo configuration

Also update the sudo cookbook
This commit is contained in:
Greg Karékinian
2017-06-09 16:08:36 +02:00
parent 0acc4e65e9
commit afc07c3192
6 changed files with 21 additions and 5 deletions

View File

@@ -113,6 +113,10 @@ end
action :install do
target = "#{node['authorization']['sudo']['prefix']}/sudoers.d/"
package 'sudo' do
not_if 'which sudo'
end
unless ::File.exist?(target)
sudoers_dir = directory target
sudoers_dir.run_action(:create)