mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Fix tests
This commit is contained in:
parent
2239c8d6e5
commit
7ae19a8ba3
@ -1,6 +1,7 @@
|
||||
# Copyright (c) 2015 Ansible, Inc.
|
||||
# All Rights Reserved.
|
||||
|
||||
import base64
|
||||
import os
|
||||
import re # noqa
|
||||
import sys
|
||||
@ -148,7 +149,10 @@ SCHEDULE_MAX_JOBS = 10
|
||||
SITE_ID = 1
|
||||
|
||||
# Make this unique, and don't share it with anybody.
|
||||
SECRET_KEY = open('/etc/tower/SECRET_KEY', 'rb').read().strip()
|
||||
if os.path.exists('/etc/tower/SECRET_KEY'):
|
||||
SECRET_KEY = open('/etc/tower/SECRET_KEY', 'rb').read().strip()
|
||||
else:
|
||||
SECRET_KEY = base64.encodebytes(os.urandom(32)).decode().rstrip()
|
||||
|
||||
# Hosts/domain names that are valid for this site; required if DEBUG is False
|
||||
# See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user