How to get given task's all variables

@Suhas_Kulkarni @neplatnyudaj refer the below post.