Sha256: cb99d4a10a6f8e86146f134915ddbe8036a54ab19e8cd6ea16fe1ad02ec9e999

Contents?: true

Size: 1.74 KB

Versions: 2

Compression:

Stored size: 1.74 KB

Contents

managed_servers = %w( <% servers.each do |s| -%><%= s %> <% end -%>)

<% if plugins.any? -%>
required_plugins = %w( <% plugins.each do |p| -%><%= p %> <% end -%>)
required_plugins.each do |plugin|
  system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin
end
<% end %>
Vagrant.configure("2") do |config|
  <% if provisioners.include? "shell" -%>
  <% shell_paths.each do |path| -%>
  config.vm.provision "shell", path: "<%= path %>"
  <% end -%>
  <% if shell_inline -%>
  config.vm.provision "shell", inline: "<%= shell_inline %>"
  <% end -%>
  <% end -%>
  <% if provisioners.include? "puppet" -%>
  <% if puppet_librarian_puppet -%>
  config.librarian_puppet.placeholder_filename = ".gitignore"
  <% end -%>
  config.vm.provision "puppet" do |puppet|
    <% if puppet_librarian_puppet -%>
    puppet.module_path = 'modules'
    <% end -%>
    <% if puppet_hiera -%>
    puppet.hiera_config_path = 'hiera.yaml'
    <% end -%>
  end
  <% end -%>
  <% if communicator == "ssh" -%>
  config.ssh.username = "<%= ssh_username %>"
  <% if ssh_password -%>
  config.ssh.password = "<%= ssh_password %>"
  <% end -%>
  <% if ssh_private_key_path -%>
  config.ssh.private_key_path = "<%= ssh_private_key_path %>"
  <% end -%>
  <% end -%>
  <% if communicator == "winrm" -%>
  config.vm.communicator = "<%= communicator %>"
  config.winrm.username = "<%= winrm_username %>"
  config.winrm.password = "<%= winrm_password %>"
  config.winrm.transport = :sspinegotiate
  <% 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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vagrant-orchestrate-0.0.7 templates/vagrant/Vagrantfile.erb
vagrant-orchestrate-0.0.6 templates/vagrant/Vagrantfile.erb