Page MenuHomeDevCentral

D2645.id6682.diff
No OneTemporary

D2645.id6682.diff

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

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)

Event Timeline