Variable is Undefined error

Hello Team,

I am trying to use the variable in the following task which i registered in the previous task.
However, i am getting “variable is undefined error”
Could you please suggest us,what could be the reason

Thanks,
Nandhakumar

Hi

Could you please tell clearly:

What the relevant tasks/playbooks/code/variables look like

Do you want me to post the playbook Dick?

Thanks,
Nandhakumar

Hi:

Hello Team,

I am trying to use the variable in the following task which i registered in the previous task.
However, i am getting “variable is undefined error”
Could you please suggest us,what could be the reason

Please share as much details as possible of your code and the way you invoke it from CLI. We cannot guess!

Hello Angel,Dick,

Below is my playbook:

As I see, you’re trying to use variables from one host or group of hosts (cmsserver) from another different group (jobserver). Those variables have a name in common but they’re still different; you can’t use reference them as if they were the same.

But I believe this post might help you:

https://serverfault.com/questions/638507/how-to-access-host-variable-of-a-different-host-with-ansible

Hope that helps

Hello Angel,

i have gone through the document.
The articles talks about the values which can be gathered os gather_Facts.
My case is bit different.Mine is a custom output which i am storing in a different register
so kindly suggest the way to get a solution for this

Thanks,
Nandhakumar