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

How to use a secret variable passed from another task


Avico

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

Best answer by JoseNutanix

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.

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

2 replies

JoseNutanix
Nutanix Employee
Forum|alt.badge.img+5
  • Nutanix Employee
  • 150 replies
  • Answer
  • October 9, 2023

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.


Avico
  • Author
  • Adventurer
  • 8 replies
  • October 9, 2023

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