From 9c6b004686202331f3484394dad230adc60941cb Mon Sep 17 00:00:00 2001 From: Dawa Ometto Date: Wed, 18 Sep 2024 12:19:00 +0200 Subject: [PATCH] Update converge.yml Improve the way changes in ansible-on-workspace are detected. --- converge.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/converge.yml b/converge.yml index 00894a9..13d916b 100644 --- a/converge.yml +++ b/converge.yml @@ -12,7 +12,10 @@ ansible.builtin.command: > ansible-playbook -c local -v -b {{ remote_plugin.arguments }} --extra-vars='{{ remote_plugin.parameters }}' /rsc/plugins/{{ item.name}}/{{ item.path }} register: ansible_on_workspace - changed_when: "ansible_on_workspace.stdout_lines is not defined or 'changed=0' not in ansible_on_workspace.stdout_lines[-1]" + changed_when: > + ansible_on_workspace.stdout_lines is not defined or + 'changed=0' not in + ansible_on_workspace.stdout_lines[ lookup('ansible.utils.index_of', ansible_on_workspace.stdout_lines, 'regex', '\s*PLAY RECAP\s*')+1 ] vars: remote_plugin: script_type: Ansible PlayBook