Skip to content

Commit

Permalink
Update converge.yml
Browse files Browse the repository at this point in the history
Improve the way changes in ansible-on-workspace are detected.
  • Loading branch information
dometto committed Sep 18, 2024
1 parent 76ba78e commit ad6c453
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ad6c453

Please sign in to comment.