diff options
author | Shane McDonald <me@shanemcd.com> | 2019-03-28 00:43:36 +0100 |
---|---|---|
committer | Shane McDonald <me@shanemcd.com> | 2019-03-28 00:43:47 +0100 |
commit | fcf6b4ae454304ddb1b4a8a1ef972e377dff6036 (patch) | |
tree | c9f0ed22a0aacb914de0732d3d6564ad10533440 /installer/roles | |
parent | Merge pull request #3523 from ryanpetrello/iso-cancel (diff) | |
download | awx-fcf6b4ae454304ddb1b4a8a1ef972e377dff6036.tar.xz awx-fcf6b4ae454304ddb1b4a8a1ef972e377dff6036.zip |
Fix bug where init scripts didnt create the admin user correctly
Diffstat (limited to 'installer/roles')
-rwxr-xr-x | installer/roles/image_build/files/launch_awx_task.sh | 3 | ||||
-rw-r--r-- | installer/roles/kubernetes/templates/environment.sh.j2 | 2 | ||||
-rw-r--r-- | installer/roles/local_docker/templates/environment.sh.j2 | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/installer/roles/image_build/files/launch_awx_task.sh b/installer/roles/image_build/files/launch_awx_task.sh index 3165c33043..d3148f74d6 100755 --- a/installer/roles/image_build/files/launch_awx_task.sh +++ b/installer/roles/image_build/files/launch_awx_task.sh @@ -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) diff --git a/installer/roles/kubernetes/templates/environment.sh.j2 b/installer/roles/kubernetes/templates/environment.sh.j2 index 1c7b79ff5c..676fd47bc8 100644 --- a/installer/roles/kubernetes/templates/environment.sh.j2 +++ b/installer/roles/kubernetes/templates/environment.sh.j2 @@ -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 }} diff --git a/installer/roles/local_docker/templates/environment.sh.j2 b/installer/roles/local_docker/templates/environment.sh.j2 index 4e58117a20..4c7a01c872 100644 --- a/installer/roles/local_docker/templates/environment.sh.j2 +++ b/installer/roles/local_docker/templates/environment.sh.j2 @@ -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 }} |