mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 01:57:35 -03:30
make preload data optional again
Signed-off-by: JAKUBIS Peter H50R8VA <peter.jakubis@erstegroup.com>
This commit is contained in:
parent
29926ba5d9
commit
a5f676c3e1
@ -24,9 +24,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
|
||||
{% if create_preload_data | bool %}
|
||||
awx-manage create_preload_data
|
||||
{% endif %}
|
||||
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
|
||||
|
||||
|
||||
@ -24,10 +24,8 @@ data:
|
||||
|
||||
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)
|
||||
|
||||
@ -49,4 +49,10 @@
|
||||
- name: Update CA trust in awx_task container
|
||||
command: docker exec awx_task '/usr/bin/update-ca-trust'
|
||||
when: awx_compose_config.changed or awx_compose_start.changed
|
||||
|
||||
- name: Create Preload data
|
||||
command: docker exec awx_task bash -c "/usr/bin/awx-manage create_preload_data"
|
||||
when: create_preload_data|bool
|
||||
register: cdo
|
||||
changed_when: "'added' in cdo.stdout"
|
||||
when: compose_start_containers|bool
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user