Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F4020626
D2645.id6682.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
989 B
Referenced Files
None
Subscribers
None
D2645.id6682.diff
View Options
diff --git a/_modules/zr.py b/_modules/zr.py
--- a/_modules/zr.py
+++ b/_modules/zr.py
@@ -124,6 +124,16 @@
return __salt__["cmd.shell"](zr_command)
+def generate_random(secret_len):
+ """
+ A function to generate a random credential
+ """
+ if _are_credentials_hidden():
+ return "random credential"
+
+ return __salt__["random.get_str"](secret_len)
+
+
def get_sentry_dsn(args):
sentry_server = _get_sentry_server(args["realm"])
diff --git a/roles/paas-docker/containers/mysql.sls b/roles/paas-docker/containers/mysql.sls
--- a/roles/paas-docker/containers/mysql.sls
+++ b/roles/paas-docker/containers/mysql.sls
@@ -44,7 +44,7 @@
- image: {{ image }}
- binds: /srv/{{ instance }}/mysql:/var/lib/mysql
- environment:
- MYSQL_ROOT_PASSWORD: {{ salt['random.get_str'](31) }}
+ MYSQL_ROOT_PASSWORD: {{ salt['zr.generate_random'](31) }}
{% if 'network' in container %}
- networks:
- {{ container['network'] }}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 20, 06:26 (21 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2361774
Default Alt Text
D2645.id6682.diff (989 B)
Attached To
Mode
D2645: Allow to document random credentials
Attached
Detach File
Event Timeline
Log In to Comment