autogenerate websocket secret

This commit is contained in:
chris meyers
2020-03-25 07:39:29 -04:00
parent 090349a49b
commit eab74cac07
4 changed files with 16 additions and 0 deletions

View File

@@ -1,4 +1,10 @@
--- ---
- name: Generate broadcast websocket secret
set_fact:
broadcast_websocket_secret: "{{ lookup('password', '/dev/null', length=128) }}"
run_once: true
no_log: true
- fail: - fail:
msg: "Only set one of kubernetes_context or openshift_host" msg: "Only set one of kubernetes_context or openshift_host"
when: openshift_host is defined and kubernetes_context is defined when: openshift_host is defined and kubernetes_context is defined

View File

@@ -12,3 +12,5 @@ DATABASES = {
}, },
} }
} }
BROADCAST_WEBSOCKET_SECRET = "{{ broadcast_websocket_secret | b64encode }}"

View File

@@ -1,4 +1,10 @@
--- ---
- name: Generate broadcast websocket secret
set_fact:
broadcast_websocket_secret: "{{ lookup('password', '/dev/null', length=128) }}"
run_once: true
no_log: true
- name: Check for existing Postgres data - name: Check for existing Postgres data
stat: stat:
path: "{{ postgres_data_dir }}/pgdata/PG_VERSION" path: "{{ postgres_data_dir }}/pgdata/PG_VERSION"

View File

@@ -19,3 +19,5 @@ CACHES = {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
}, },
} }
BROADCAST_WEBSOCKET_SECRET = "{{ broadcast_websocket_secret | b64encode }}"