Merge pull request #4107 from gizero/docker-compose-fix-create_preload_data

ensure "create_preload_data" is honored in docker-compose deployments
This commit is contained in:
Shane McDonald 2019-11-12 11:44:15 -05:00 committed by GitHub
commit f66f24eb83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -124,8 +124,8 @@
delegate_to: localhost
- name: Stage launch_awx_task
copy:
src: launch_awx_task.sh
template:
src: launch_awx_task.sh.j2
dest: "{{ docker_base_path }}/launch_awx_task.sh"
mode: '0700'
delegate_to: localhost

View File

@ -18,7 +18,9 @@ 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 %}
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
awx-manage provision_instance --hostname=$(hostname)