1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

Merge pull request #3535 from shanemcd/oops

Fix bug where init scripts didnt create the admin user correctly

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-03-28 00:39:05 +00:00 committed by GitHub
commit 9479b1b824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -19,9 +19,6 @@ fi
if [ ! -z "$AWX_ADMIN_USER" ]&&[ ! -z "$AWX_ADMIN_PASSWORD" ]; then
echo "from django.contrib.auth.models import User; User.objects.create_superuser('$AWX_ADMIN_USER', 'root@localhost', '$AWX_ADMIN_PASSWORD')" | awx-manage shell
awx-manage create_preload_data
else
echo "from django.contrib.auth.models import User; User.objects.create_superuser('admin', 'root@localhost', 'password')" | awx-manage shell
awx-manage create_preload_data
fi
echo 'from django.conf import settings; x = settings.AWX_TASK_ENV; x["HOME"] = "/var/lib/awx"; settings.AWX_TASK_ENV = x' | awx-manage shell
awx-manage provision_instance --hostname=$(hostname)

View File

@ -5,3 +5,5 @@ DATABASE_PORT={{ pg_port|default('5432') }}
DATABASE_PASSWORD={{ pg_password }}
MEMCACHED_HOST={{ memcached_hostname|default('localhost') }}
RABBITMQ_HOST={{ rabbitmq_hostname|default('localhost') }}
AWX_ADMIN_USER={{ admin_user }}
AWX_ADMIN_PASSWORD={{ admin_password }}

View File

@ -5,3 +5,5 @@ DATABASE_PORT={{ pg_port|default('5432') }}
DATABASE_PASSWORD={{ pg_password }}
MEMCACHED_HOST={{ memcached_hostname|default('memcached') }}
RABBITMQ_HOST={{ rabbitmq_hostname|default('rabbitmq') }}
AWX_ADMIN_USER={{ admin_user }}
AWX_ADMIN_PASSWORD={{ admin_password }}