]> git.openstreetmap.org Git - chef.git/blob - cookbooks/chef/libraries/random_password.rb
build(deps): bump kitchen-dokken from 2.17.2 to 2.17.3
[chef.git] / cookbooks / chef / libraries / random_password.rb
1 class Chef
2   class Recipe
3     def random_password(length)
4       Array.new(length) do
5         "!\#$%&()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"[rand(91)].chr
6       end.join
7     end
8   end
9 end