I noticed, in our Foreman environment, the ansible roles in the ansible smart proxy server when tasks are delegated to a different host rather than running on target host, task runs on control host which is the smart proxy server. This doesn’t not produce any error messages, also it shows that it switched from target host to delegated host, but the actual task runs on the control host.
HAs anyone any experience on this. I am testing using very simple ansible role which has two tasks, one runs on the target node and other run on delegated host. Both tasks only write a line in log file in temp directory. When task with delegate_to: is runs it show like this:
changed: [ ***<target host>*** -> ***<delegated host>*** ]
But the task actually happening in the control node (smart proxy node), not even in target node.
Un delegated task run correctly on target node.
Is this a bug, or some setup missing in ansible setup in Foreman smart proxy?
Please help me if anyone can.