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:
commit
9479b1b824
@ -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)
|
||||
|
@ -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 }}
|
||||
|
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user