I access a target host thru a bastion server which requires a Yubikey password. I have setup ssh keys so I can access the target host without a password prompt once the authenticated socket on the bastion is cached. When I run setup against the target host, none of the specific environment variables setup via .bashrc on that target host appear.
Here’s a snippet of my ~/.ssh/config to show how I access the target::
Host xx
Hostname xxname.example.com
Host xxdb*
ProxyCommand ssh -q xx -W %h:%p
The environment variables I’m after are on the xxdb02 server (via ssh xxdb02) under a Linux account which owns the vendor software I’m trying to manage. These environment variables vary by host. Rather than recreate this data in yml I want to pick up what’s already defined in the target host account. To no avail I’ve played around with the environment key word and with shell commands to pickup these variables.
There must be a better way. Please cure me of my cluelessness.
AtDhVaAnNkCsE