Skip to content

Instantly share code, notes, and snippets.

@afiune
Last active June 7, 2017 17:58
Show Gist options
  • Save afiune/7791a3714d79f2e72eac to your computer and use it in GitHub Desktop.
Save afiune/7791a3714d79f2e72eac 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" ]
}
@yogeshrathore1992
Copy link

You can use the my created script "multinode_bootstrap" for multiple node bootstrap

you can download file "multinode_bootstrap.x" from

https://github.com/yogeshrathorewebsym/chef_bootstrap/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment