diff options
author | chris meyers <chris.meyers.fsu@gmail.com> | 2020-03-25 12:39:29 +0100 |
---|---|---|
committer | chris meyers <chris.meyers.fsu@gmail.com> | 2020-03-26 15:32:37 +0100 |
commit | eab74cac07511c0cff4ae351d59189b4e435a447 (patch) | |
tree | 751b0a9767b407894a5ee2670883bb0c07ab10d9 /installer/roles/local_docker | |
parent | Merge pull request #6416 from jakemcdermott/6413-remove-unnecessary-project-t... (diff) | |
download | awx-eab74cac07511c0cff4ae351d59189b4e435a447.tar.xz awx-eab74cac07511c0cff4ae351d59189b4e435a447.zip |
autogenerate websocket secret
Diffstat (limited to 'installer/roles/local_docker')
-rw-r--r-- | installer/roles/local_docker/tasks/main.yml | 6 | ||||
-rw-r--r-- | installer/roles/local_docker/templates/credentials.py.j2 | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/installer/roles/local_docker/tasks/main.yml b/installer/roles/local_docker/tasks/main.yml index 446f110f83..53dca32331 100644 --- a/installer/roles/local_docker/tasks/main.yml +++ b/installer/roles/local_docker/tasks/main.yml @@ -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 stat: path: "{{ postgres_data_dir }}/pgdata/PG_VERSION" diff --git a/installer/roles/local_docker/templates/credentials.py.j2 b/installer/roles/local_docker/templates/credentials.py.j2 index d712636167..308ce1ff5e 100644 --- a/installer/roles/local_docker/templates/credentials.py.j2 +++ b/installer/roles/local_docker/templates/credentials.py.j2 @@ -19,3 +19,5 @@ CACHES = { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', }, } + +BROADCAST_WEBSOCKET_SECRET = "{{ broadcast_websocket_secret | b64encode }}" |