Sha256: 3c3ce4a625a63ae1c293052841b9ae73f535903c843638f6e1ea315f2945e142

Contents?: true

Size: 988 Bytes

Versions: 1

Compression:

Stored size: 988 Bytes

Contents

# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile generated with https://github.com/afaundez/vagrant-templated

<%- if template_attributes['require'] && template_attributes['require']['vagrant-plugins'] -%>
<%= template_attributes['require']['vagrant-plugins'].to_a %>.each do |plugin_name|
  unless Vagrant.has_plugin? plugin_name
    raise "#{plugin_name} plugin is required. Please run `vagrant plugin install #{plugin_name}`"
  end
end
<%- end -%>

Vagrant.configure('2') do |config|
  config.vm.box = 'bento/ubuntu-16.04'
  config.omnibus.chef_version = '<%= template_attributes['omnibus']['chef_version'] %>'
  config.vm.provision :chef_solo do |chef|
    <%- template_attributes['chef']['recipes'].each do |recipe| -%>
    chef.add_recipe '<%= recipe %>'
    <%- end -%>
    <% lines = JSON.pretty_generate(template_attributes['chef']['json']).lines %>
    chef.json = <%= lines.shift.strip %>
    <%- lines.each do |line| -%>
    <%= line.rstrip %>
    <%- end -%>
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-templated-0.1.3 config/templates/files/Vagrantfile.erb