OndrejHome/ansible.ha-cluster-pacemaker

group_by task always reports 'changes'

Closed this issue · 2 comments

Issue:
Since the inclusion of code that required group_by, the role always reports the task with group_by to be changed. Even when changed_when: False is used. This issue is here as reminder to check how (and if) this can be somehow fixed.
This seems to be limited to newer versions of Ansible (2.9.x/2.10.x), version 2.8.x has no such issue.

For possible contributors:
If you have a good idea on how to fix this issue feel free to open PR and refer to this issue.

as a feedback from locally testing fixes: changed_when: false perfectly works for me and ansible 2.13.x

- name: Add a group to the inventory for remote nodes
  changed_when: false
  group_by:
    key: "cluster{{ rand_id }}_node_is_remote_{{ cluster_node_is_remote | bool }}"

Hi Marcus (@mashpie ) and thank you for feedback. I have probably missed notification for this comment.
Testing this out in newer versions indeed works as intended with changed_when: false and as the 2.9 and 2.10 are way beyond their EOL I think I can just add the changed_when: false and this can be closed.
Thanks again for feedback!