fix and improve ansible helpers