Zanzibar
vagrant-zanzibar is a fork of zanzibar intended to work with Vagrant environments to retrieve secrets from a Secret Server installation. It supports retrieval of a password, public/private key, or secret attachment.
Installation
Add this line to your application's Gemfile:
gem 'vagrant-zanzibar'
And then execute:
$ bundle
Or install it yourself as:
$ gem install vagrant-zanzibar
Usage
Here is an example Vagrantfile, using vagrant-orchestrate.
## Make sure that required plugins are installed.
required_plugins = %w( vagrant-managed-servers vagrant-triggers vagrant-zanzibar)
required_plugins.each do |plugin|
system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin
end
require 'vagrant-zanzibar'
= Zanzibar::Zanzibar.new(:wsdl => "https://mysecretserver.com/webservices/sswebservice.asmx?wsdl", :domain => 'mydomain.net')
managed_servers = %w( myserver1.net )
Vagrant.configure("2") do |config|
config.ssh.username = "user"
config.ssh.private_key_path = .download_secret_file(:scrt_id => 1234, :type => "Private Key")
config.trigger.before :provision do
# This password needs to be checked out
.get_password(3456)
end
config.trigger.after :destroy do
.check_in_secrets
end
managed_servers.each do |instance|
config.vm.define "managed-#{instance}" do |box|
box.vm.box = "tknerr/managed-server-dummy"
box.vm.box_url = "./dummy.box"
box.vm.provider :managed do |provider|
provider.server = instance
end
end
end
end
Contributing
- Fork it ( https://github.com/Cimpress-MCP/vagrant-zanzibar/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request