Guest User

Untitled

a guest
Apr 25th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. current_apt_keys = Dir[
  2. File.expand_path(File.join(File.dirname(__FILE__), "..", "files", "default", "apt-keys", "*"))
  3. ]
  4.  
  5. ruby_block "cleanup apt-keys" do
  6. block do
  7. Dir[
  8. File.expand_path(File.join(Chef::Config[:file_cache_path], "cache", "apt_keys", "*"))
  9. ].each do |rf|
  10. unless current_apt_keys.include?(rf)
  11. File.delete(rf)
  12. end
  13. end
  14. end
  15. end
Add Comment
Please, Sign In to add comment