Skip to content

Retrieving Environment Variables from within Automate #23084

Closed Answered by Fryguy
bfilion87 asked this question in Q&A
Discussion options

You must be logged in to vote

This is not possible in automate because of the distributed nature of how it works. In a multi-appliance setup, you might export on one appliance, but then the next step of the state machine could run on a different appliance where that variable won't exist. Also note that in the future we are planning on isolating automate steps into containers so that they can't have access to the underlying system, and then if you export an ENV var in that case, then it definitely won't exist in a future step.

Instead, it's probably better to use something like $evm.set_state_var and $evm.get_state_var if within a state machine, or you can store the value in $evm.root

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bfilion87
Comment options

Answer selected by Fryguy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants