Skip to content

Instantly share code, notes, and snippets.

@AzMoo
Created September 8, 2015 00:23
Show Gist options
  • Save AzMoo/c0c6c30bf9484d309dd4 to your computer and use it in GitHub Desktop.
Save AzMoo/c0c6c30bf9484d309dd4 to your computer and use it in GitHub Desktop.
Puppet Django Secret Key
module Puppet::Parser::Functions
newfunction(:django_secret_key) do |args|
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$^&*(-_=+)'
password = ''
50.times { password << chars[rand(chars.size)] }
return password
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment