It was the case that ansible_lvm was not defined if there were no lvm-related entities on a system. More recent ansible versions are returning ansible_lvm regardless with the twist that when there are no lvm-related entities it is a string ("N/A") rather than a mapping.
This change addresses the change by continuing to check if ansible_lvm is defined with an additional check that it is a mapping.
It was the case that ansible_lvm was not defined if there were no lvm-related entities on a system. More recent ansible versions are returning ansible_lvm regardless with the twist that when there are no lvm-related entities it is a string ("N/A") rather than a mapping.
This change addresses the change by continuing to check if ansible_lvm is defined with an additional check that it is a mapping.