1 2 3 4 5 6 7 8 9
#!/bin/bash # Param 1: Role-Name # Param 2: Policy for Role vault write auth/approle/role/$1 policies=$2 token_ttl=1200 vault read auth/approle/role/$1/role-id | grep role_id vault write -f auth/approle/role/$1/secret-id | grep "secret_id "
You can clone a snippet to your computer for local editing. Learn more.