I would like to generate a password inside of the bash task. I came up with the following:
- task: Bash@3
displayName: 'Bash generate password'
inputs:
targetType: 'inline'
script: |
password=$(cat /dev/urandom | tr -dc 'A-Za-z0-9_!@#$%^&*()\-+=' | fold -w 32 | head -n 1)
echo "##vso[task.setvariable variable=password]$password"
Unfortunately this seems to be not working, cause the task is running forever. The agent is Linux machine.