I have the following role in my Ansible boot book to determine the installed version of Packer and conditionally install it if it does not match the version of the local variable:
--- # detect packer version - name: determine packer version shell: /usr/local/bin/packer -v || true register: packer_installed_version - name: install packer cli tools unarchive: src: https:
The problem / annoyance is that Ansible marks this step as βmodifiedβ:

I would like to collect this fact without noting something that has changed, so that I can reliably find out at the end of the execution of my book if something really has changed.
Is there a better way to do what I do above?
source share