Properly check if vm_hardware contains keys
Properly check if vm_hardware contains keys

This commit fixes #1475

Signed-off-by: Vyronas Tsingaras <64b96c8e9de4e32468620d31d9013f7fd48d550d@it.auth.gr>

thaim/ansible,thaim/ansible