mirror of
https://github.com/ansible/awx.git
synced 2026-05-17 22:37:41 -02:30
Merge pull request #5796 from rascasoft/devel
Make possible to not start containers on compose Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -18,3 +18,5 @@ memcached_image: "memcached"
|
|||||||
memcached_version: "alpine"
|
memcached_version: "alpine"
|
||||||
memcached_hostname: "memcached"
|
memcached_hostname: "memcached"
|
||||||
memcached_port: "11211"
|
memcached_port: "11211"
|
||||||
|
|
||||||
|
compose_start_containers: true
|
||||||
|
|||||||
@@ -23,16 +23,18 @@
|
|||||||
mode: 0600
|
mode: 0600
|
||||||
register: awx_secret_key
|
register: awx_secret_key
|
||||||
|
|
||||||
- name: Start the containers
|
- block:
|
||||||
docker_compose:
|
- name: Start the containers
|
||||||
project_src: "{{ docker_compose_dir }}"
|
docker_compose:
|
||||||
restarted: "{{ awx_compose_config is changed or awx_secret_key is changed }}"
|
project_src: "{{ docker_compose_dir }}"
|
||||||
register: awx_compose_start
|
restarted: "{{ awx_compose_config is changed or awx_secret_key is changed }}"
|
||||||
|
register: awx_compose_start
|
||||||
|
|
||||||
- name: Update CA trust in awx_web container
|
- name: Update CA trust in awx_web container
|
||||||
command: docker exec awx_web '/usr/bin/update-ca-trust'
|
command: docker exec awx_web '/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: Update CA trust in awx_task container
|
- name: Update CA trust in awx_task container
|
||||||
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
|
||||||
|
when: compose_start_containers|bool
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
file:
|
file:
|
||||||
path: "{{ postgres_data_dir + '/pgdata' }}"
|
path: "{{ postgres_data_dir + '/pgdata' }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
when: compose_start_containers|bool
|
||||||
|
|
||||||
- import_tasks: set_image.yml
|
- import_tasks: set_image.yml
|
||||||
- import_tasks: compose.yml
|
- import_tasks: compose.yml
|
||||||
|
|||||||
Reference in New Issue
Block a user