forked from pythian/opsviz
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgen_secrets.py
22 lines (18 loc) · 872 Bytes
/
gen_secrets.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python
"""
Create secure passwords for use in this stack.
"""
from __future__ import print_function
import random
import string
def gen_password(length=10):
return u''.join([random.SystemRandom().choice("{}{}{}".format(string.ascii_letters, string.digits, u"!@#$%^&*(-_=+)")) for i in xrange(length)])
if __name__ == "__main__":
print("rabbitmq password for logger: {}".format(gen_password()))
print("rabbitmq password for logstash_internal: {}".format(gen_password()))
print("rabbitmq password for logstash_external: {}".format(gen_password()))
print("rabbitmq password for sensu : {}".format(gen_password()))
print("rabbitmq password for statsd: {}".format(gen_password()))
print("")
print("rabbitmq erlang cookie: {}".format(gen_password(50)))
print("rabbitmq doorman session_secret: {}".format(gen_password(50)))