Can we get some clarification – are you asking for whether you can use Ansible with Citrix console, or help with having Ansible terminating hung user sessions? Or Is the issue that you want able to do tasks with Ansible through Citrix?
You seem to be missing the point of our questions. When Dick Visser asked, “How would you do such a thing without ansible?” and “Could you tell us how you do this currently?”, he’s not asking for you to restate the problem. We know you find and kill hung user processes, and that you do it manually.
Rather, he’s asking: “Please state the steps you currently execute to accomplish this task manually.” If you can explain your manual solution to us, then together perhaps we can explain it to Ansible.
Think of it this way. If you were going on vacation for 2 months, and a new employee who has never seen this system before is supposed to take care of things while you’re gone, what exact, detailed instructions would you give that person? Now, imagine that person’s name is Ansible von Blunderklutz. Because it’s this level of detail we need, not “manually” or “get hung user sessions and kill them”. Those are fine goals, but they are not processes. Ansible lets you automate processes.