1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00
awx/installer/roles/local_docker/tasks/compose.yml
impca 9add96a0d3
update docker compose installer
Only run commands to update certs when config changes.
2019-02-14 08:29:47 +01:00

25 lines
758 B
YAML

---
- name: Create {{ docker_compose_dir }} directory
file:
path: "{{ docker_compose_dir }}"
state: directory
- name: Create docker-compose.yml file
template:
src: docker-compose.yml.j2
dest: "{{ docker_compose_dir }}/docker-compose.yml"
register: awx_compose_config
- name: Start the containers
docker_service:
project_src: "{{ docker_compose_dir }}"
register: awx_compose_start
- name: Update CA trust in awx_web container
command: docker exec awx_web_1 '/usr/bin/update-ca-trust'
when: awx_compose_config.changed or awx_compose_start.changed
- name: Update CA trust in awx_task container
command: docker exec awx_task_1 '/usr/bin/update-ca-trust'
when: awx_compose_config.changed or awx_compose_start.changed