In this publication titled ansible define variables in task, I have provided a complete image from start to finish ,Please look below