From f047fbd4a9983304ab04460969bca1ae93461bb3 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 14 Sep 2017 20:02:47 +0100 Subject: [PATCH] Add workaround for ansible issue #21188 to inspection store 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. --- ansible/roles/inspection-store/handlers/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ansible/roles/inspection-store/handlers/main.yml b/ansible/roles/inspection-store/handlers/main.yml index 6f52517ea..940facb3c 100644 --- a/ansible/roles/inspection-store/handlers/main.yml +++ b/ansible/roles/inspection-store/handlers/main.yml @@ -4,6 +4,10 @@ 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