Skip to content

Instantly share code, notes, and snippets.

@vinyar
Forked from afiune/vault_examples.rb
Created April 4, 2016 08:29
Show Gist options
  • Save vinyar/ec689cf85aa5660289071b6565589896 to your computer and use it in GitHub Desktop.
Save vinyar/ec689cf85aa5660289071b6565589896 to your computer and use it in GitHub Desktop.
Chef Bootstrap with Chef Vaults
# Chef Bootstrap with Chef Vaults
# Required chef version: 12
# Single Vault Item
$ knife bootstrap node1 -N node1 --sudo -r 'recipe[cookbook::default]' --bootstrap-vault-item 'vault:item'
# Multiple Vault through JSON
$ knife bootstrap node1 -N node1 --sudo -r 'recipe[cookbook::default]' --bootstrap-vault-json {"vault1":"item1","vault2":"item2"}
# Multiple Vault through File
$ knife bootstrap node1 -N node1 --sudo -r 'recipe[cookbook::default]' --bootstrap-vault-file my_vaults.json
## Content of my_vaults.json
{
"vault1": "item1",
"vault2": "item2",
"vault3": [ "item3", "item4", "item5" ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment