Closed mohamed-imran closed 7 years ago
This seems like an installation problem with chef-vault on your node, not with the chef-vault cookbook. In particular, it looks like your path is set so that chef's knife, which doesn't have vault installed, is picked rather than ChefDK's knife.
Chef-client version
Chef Client version 12.12.15
Platform Details
Windows Server 2008 R2 Standard
Scenario:
I am trying to execute knife vault show VAULT on a Jenkins slave to retrieve the credentials during job execution time, so that I can explicitly call chef-client on the target nodes using those credentials. However, I receive an error Fatal: Cannot find subcommand for: 'vault show VAULT ITEM'. The same command if execute on the admin command prompt, vault command is executed successfully. Since I want to run these command as part of automation, I require them to execute in non-admin prompt.
The difference I have noted was if there is chef-client and chef DK on that server where I execute knife vault command, it works only on admin command prompt.
If there is no chef-client and only Chef DK, knife vault command works both non-admin and admin command prompt.
Steps to Reproduce:
Install chef-client 12.12.15 Install chef-dk 0.16.28 Open command prompt or powershell Go to your .chef folder Type knife vault show VAULT
Expected Result:
List of all vault items in the vault
Actual Result:
Fatal: Cannot find subcommand for: 'vault show VAULT ITEM'