On my node node_name
I've got $JAVA_HOME
and other environment variables set in /etc/profile
. I'm aware (found that out) that knife ssh
isn't a login shell, and so doesn't load the environment variables. Is there a way to load the environment variables without having to source
it?
Right now I'm forced to do
knife ssh 'name:nod_name' 'source /etc/profile; echo $JAVA_HOME'
I'm chaining in a few commands during knife ssh
including some of the environment variables and loading the /etc/profile
just makes that longer. Is there a way to load the /etc/profile during knife ssh?