Sha256: 8cfc8de4bd56fe3beb4b799a889fb15767afb1513a83207198928087e85f7cdf
Contents?: true
Size: 723 Bytes
Versions: 14
Compression:
Stored size: 723 Bytes
Contents
require 'config_builder/model' module VagrantHosts module ConfigBuilder class Model < ::ConfigBuilder::Model::Base # @!attribute [rw] hosts attr_accessor :hosts # @!attribute [rw] autoconfigure attr_accessor :autoconfigure def initialize @hosts = [] end def to_proc Proc.new do |vm_config| vm_config.provision :hosts do |h_config| h_config.autoconfigure = @autoconfigure if defined? @autoconfigure @hosts.each do |(address, aliases)| h_config.add_host address, aliases end end end end ::ConfigBuilder::Model::Provisioner.register('hosts', self) end end end
Version data entries
14 entries across 14 versions & 1 rubygems