f047fbd4a9
The restart handler task fails unless the image argument is passed to the docker_container module. This shouldn't be necessary, as it should be possible to identify the container by name alone.
20 lines
746 B
YAML
20 lines
746 B
YAML
---
|
|
- name: Restart inspection store container
|
|
docker_container:
|
|
name: "{{ item.value.container_name }}"
|
|
state: started
|
|
restart: True
|
|
# NOTE: The image argument shouldn't be required, but without it this
|
|
# handler fails on Ansible 2.3. Related bug:
|
|
# https://github.com/ansible/ansible/issues/21188.
|
|
image: "{{ item.value.image }}"
|
|
with_dict: "{{ inspection_store_services }}"
|
|
when: item.value.enabled
|
|
|
|
- name: Ensure inspection store data directory exists
|
|
command: >
|
|
docker exec {{ inspection_store_services.inspection_store.container_name }}
|
|
bash -c "mkdir -p /data/ironic-inspector &&
|
|
chown nginx:nginx /data/ironic-inspector"
|
|
when: inspection_store_services.inspection_store.enabled
|