Variable for Linked (Vault) host?

Variable for Linked (Vault) host?

avatar

e: RDM 2022.3.22.0

When I try to use the $HOST$ variable to reference a linked host, the variable doesn't resolve:
forum image

Here is how the entry is configured:
forum image

All Comments (5)

avatar

Hello,

I just tested it in RDM 2022.3.27 and the $HOST$ variable can be used without problem. In my test, I added a message prompt event in the before open, and I get the name of the Host from the linked host entry.

forum image

Was there a specific location the $HOST$ variable is not working?


Best regards,

Richard Boisvert

avatar

Just updated to 2022.3.27 and created a new entry using the $HOST$ variable for the name and also a message prompt like you did. The name in the tree is blank and the message prompt just says $HOST$.
forum image

forum image

avatar

An update:

In my original post, the linked host uses $NAME$ for its host field:
forum image

I created another host that doesn't reference a variable in the host field, then created a second entry and linked its host to the first. The variable still doesn't resolve in the name field but it does resolve in the before open message box.

forum image

avatar

Hello,

In the host entry, if you place $NAME$ in the host field, it will use the same variable in the entry where you use that host, it will not process the variable before passing it to the SSH entry. That means that in your SSH session, since the name is referencing the host, it is looping, since the name is referencing the host, and the host is referencing the name.

You would need to modify the $NAME$ in the host field of the host entry to an actual value, or a different variable.

Best regards,

Richard Boisvert

avatar

Hi I have a similar problem,
I want to use $HOST$ taken from linked PAM that is Secrestserver . I've enabled the Event as suggested but it doesen't resolve $HOSTS$ variable.

15347217-85d7-4be3-9b2a-b8ac352169c1

15347217-85d7-4be3-9b2a-b8ac352169c1.png