How to use a secret variable passed from another task | Nutanix Community
Skip to main content

Hi

In task 1 I'm setting a variable with print(“test,secret=john”)

How can I use the content of test variable (John) in task 2?

Trying to use @@{test}@@ as a string will only return xxxx (the mask but not the content)

Thanks,

Avi

Hi Avico,

This is expected. You are setting the attribute secret, it means the outputs in the audit tab will get obfuscated. If on the second script where you are using the macro you do something like echo @@{test}@@ > output.txt you’ll see the word john.


Thank you Jose!

Got it.

I thought that once it’s passed to the next task it’s being unmasked. apparently it stays masked but you can evaluate its content.

Great help!

Have a great day

Avico