Skip to content

Instantly share code, notes, and snippets.

@sammcgeown
Created December 4, 2019 15:38
Show Gist options
  • Save sammcgeown/f53e2fee1b7b281e5dd983f0743b3294 to your computer and use it in GitHub Desktop.
Save sammcgeown/f53e2fee1b7b281e5dd983f0743b3294 to your computer and use it in GitHub Desktop.
var vaultUser = "vra"
var vaultPassword = "VMware1!"
var vaultServer = "vault.definit.local"
var vaultPort = "8200"
var vaultSecretPath = "vra/ssh"
var vaultToken = System.getModule("local.definit.vault").getVaultToken(vaultUser,vaultPassword,vaultServer,vaultPort);
var vaultData = System.getModule("local.definit.vault").getVaultSecretData(vaultServer,vaultPort,vaultSecretPath,vaultToken);
var userNames = new Array();
for (var userName in JSON.parse(vaultData)) {
userNames.push(userName);
}
return userNames;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment