How to use generate function to run a shell script on master?

asked 2016-01-13 04:45:45 -0600

VeekshaVasanth gravatar image

I want to execute a customized shell script on master to get a value for a variable at the agent side.

edit retag flag offensive close merge delete


you can try custom facts to get details of your agent. Also, it will be better if you explain more clearly what details you wanna get from the agent.

Chutki gravatar imageChutki ( 2016-01-13 06:33:09 -0600 )edit

The command to be executed needs an argument which is a value stored in .yaml file, So, the command needs to be executed is: $x=generate("/bin/sh","-c","${jasypt_location}/bin/ input=xxxx password=PrimeHomePassword algorithm=xxxxxx verbose=false"), $x wont have any value after agent run

VeekshaVasanth gravatar imageVeekshaVasanth ( 2016-01-13 07:24:31 -0600 )edit

so you meant, want to get value of "x" from agent .

Chutki gravatar imageChutki ( 2016-01-14 04:00:38 -0600 )edit

Exactly yes.

VeekshaVasanth gravatar imageVeekshaVasanth ( 2016-01-15 22:18:22 -0600 )edit