From 89ac53acd7b048aa26d7ad25620d34b5edc1fecc Mon Sep 17 00:00:00 2001 From: Erwan Miran Date: Wed, 7 Nov 2018 21:39:44 +0100 Subject: [PATCH] _ansible_item_label is not necessarily set (#3646) --- contrib/dind/roles/dind-host/tasks/main.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/dind/roles/dind-host/tasks/main.yaml b/contrib/dind/roles/dind-host/tasks/main.yaml index a9b102ff0..ee7d1a92f 100644 --- a/contrib/dind/roles/dind-host/tasks/main.yaml +++ b/contrib/dind/roles/dind-host/tasks/main.yaml @@ -52,7 +52,7 @@ {{ distro_raw_setup_done }} && echo SKIPPED && exit 0 until [ "$(readlink /proc/1/exe)" = "{{ distro_pid1_exe }}" ] ; do sleep 1; done {{ distro_raw_setup }} - delegate_to: "{{ item._ansible_item_label }}" + delegate_to: "{{ item._ansible_item_label|default(item.item) }}" with_items: "{{ containers.results }}" register: result changed_when: result.stdout.find("SKIPPED") < 0 @@ -62,7 +62,7 @@ until test -S /var/run/dbus/system_bus_socket; do sleep 1; done systemctl disable {{ distro_agetty_svc }} systemctl stop {{ distro_agetty_svc }} - delegate_to: "{{ item._ansible_item_label }}" + delegate_to: "{{ item._ansible_item_label|default(item.item) }}" with_items: "{{ containers.results }}" changed_when: false @@ -74,13 +74,13 @@ mv -b /etc/machine-id.new /etc/machine-id cmp /etc/machine-id /etc/machine-id~ || true systemctl daemon-reload - delegate_to: "{{ item._ansible_item_label }}" + delegate_to: "{{ item._ansible_item_label|default(item.item) }}" with_items: "{{ containers.results }}" - name: Early hack image install to adapt for DIND raw: | rm -fv /usr/bin/udevadm /usr/sbin/udevadm - delegate_to: "{{ item._ansible_item_label }}" + delegate_to: "{{ item._ansible_item_label|default(item.item) }}" with_items: "{{ containers.results }}" register: result changed_when: result.stdout.find("removed") >= 0