mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 04:10:44 -03:30
skip migrations If an environment variable is set
This is to help k8s/openshift migrations which will perform migrations in a separate pod.
This commit is contained in:
parent
047b5755bf
commit
14685901aa
@ -10,7 +10,10 @@ ANSIBLE_REMOTE_TEMP=/tmp ANSIBLE_LOCAL_TEMP=/tmp ansible -i "127.0.0.1," -c loca
|
||||
ANSIBLE_REMOTE_TEMP=/tmp ANSIBLE_LOCAL_TEMP=/tmp ansible -i "127.0.0.1," -c local -v -m wait_for -a "host=$RABBITMQ_HOST port=5672" all
|
||||
ANSIBLE_REMOTE_TEMP=/tmp ANSIBLE_LOCAL_TEMP=/tmp ansible -i "127.0.0.1," -c local -v -m postgresql_db --become-user $DATABASE_USER -a "name=$DATABASE_NAME owner=$DATABASE_USER login_user=$DATABASE_USER login_host=$DATABASE_HOST login_password=$DATABASE_PASSWORD port=$DATABASE_PORT" all
|
||||
|
||||
awx-manage migrate --noinput
|
||||
if [ ! -z "$AWX_SKIP_MIGRATIONS" ]; then
|
||||
awx-manage migrate --noinput
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user