mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
Run migrations via a task, not in the container
* Issue: https://github.com/ansible/awx/issues/9077 * Fixes problem with migrations not completing
This commit is contained in:
@@ -36,6 +36,11 @@
|
|||||||
register: awx_secret_key
|
register: awx_secret_key
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
- name: Run migrations in task container
|
||||||
|
shell: docker-compose run --rm --service-ports task awx-manage migrate --no-input
|
||||||
|
args:
|
||||||
|
chdir: "{{ docker_compose_dir }}"
|
||||||
|
|
||||||
- name: Start the containers
|
- name: Start the containers
|
||||||
docker_compose:
|
docker_compose:
|
||||||
project_src: "{{ docker_compose_dir }}"
|
project_src: "{{ docker_compose_dir }}"
|
||||||
@@ -50,6 +55,11 @@
|
|||||||
command: docker exec awx_task '/usr/bin/update-ca-trust'
|
command: docker exec awx_task '/usr/bin/update-ca-trust'
|
||||||
when: awx_compose_config.changed or awx_compose_start.changed
|
when: awx_compose_config.changed or awx_compose_start.changed
|
||||||
|
|
||||||
|
- name: Wait for launch script to create user
|
||||||
|
wait_for:
|
||||||
|
timeout: 10
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Create Preload data
|
- name: Create Preload data
|
||||||
command: docker exec awx_task bash -c "/usr/bin/awx-manage create_preload_data"
|
command: docker exec awx_task bash -c "/usr/bin/awx-manage create_preload_data"
|
||||||
when: create_preload_data|bool
|
when: create_preload_data|bool
|
||||||
|
|||||||
@@ -149,6 +149,7 @@ services:
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
environment:
|
environment:
|
||||||
|
AWX_SKIP_MIGRATIONS: "1"
|
||||||
http_proxy: {{ http_proxy | default('') }}
|
http_proxy: {{ http_proxy | default('') }}
|
||||||
https_proxy: {{ https_proxy | default('') }}
|
https_proxy: {{ https_proxy | default('') }}
|
||||||
no_proxy: {{ no_proxy | default('') }}
|
no_proxy: {{ no_proxy | default('') }}
|
||||||
|
|||||||
Reference in New Issue
Block a user