More complicated provider setup

This commit is contained in:
sophia 2021-05-20 16:28:14 -05:00 committed by Paul Hinze
parent 5467b9134c
commit 81368d83dd
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
4 changed files with 14 additions and 6 deletions

10
Vagrantfile vendored
View File

@ -7,7 +7,11 @@ Vagrant.configure("2") do |config|
config.ssh.connection_timeout = 30
config.vm.provider "virtualbox" do |v|
v.name = "my_vm",
v.default_nic_type = "82543GC"
v.gui = false
end
config.vm.provider "idontexist" do |v|
v.gui = false
end
@ -31,6 +35,10 @@ Vagrant.configure("2") do |config|
c.vm.provision "file", source: "/Users/sophia/project/vagrant-ruby/.gitignore", destination: "/.gitignore"
c.vm.network "forwarded_port", guest: 80, host: 8080
c.vm.synced_folder ".", "vagrant", disabled: true
c.vm.provider "virtualbox" do |v|
v.gui = true
end
end
config.vm.provision "shell", inline: "echo hello world"

View File

@ -338,7 +338,7 @@ type VagrantfileComponents_ConfigVM struct {
AllowHostsModificaion bool `protobuf:"varint,2,opt,name=allow_hosts_modificaion,json=allowHostsModificaion,proto3" json:"allow_hosts_modificaion,omitempty"`
Box string `protobuf:"bytes,3,opt,name=box,proto3" json:"box,omitempty"`
// TODO: CloudInit = 4 (Experimental)
Provider *VagrantfileComponents_Provider `protobuf:"bytes,5,opt,name=provider,proto3" json:"provider,omitempty"`
Provider []*VagrantfileComponents_Provider `protobuf:"bytes,5,rep,name=provider,proto3" json:"provider,omitempty"`
// TODO: Disks = 6 (Experimental)
Networks []*VagrantfileComponents_Network `protobuf:"bytes,7,rep,name=networks,proto3" json:"networks,omitempty"`
Provisioners []*VagrantfileComponents_Provisioner `protobuf:"bytes,8,rep,name=provisioners,proto3" json:"provisioners,omitempty"`
@ -398,7 +398,7 @@ func (x *VagrantfileComponents_ConfigVM) GetBox() string {
return ""
}
func (x *VagrantfileComponents_ConfigVM) GetProvider() *VagrantfileComponents_Provider {
func (x *VagrantfileComponents_ConfigVM) GetProvider() []*VagrantfileComponents_Provider {
if x != nil {
return x.Provider
}
@ -1182,7 +1182,7 @@ var file_proto_ruby_vagrant_ruby_server_proto_rawDesc = []byte{
0x28, 0x08, 0x52, 0x15, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x4d, 0x6f,
0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x6f, 0x78,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x62, 0x6f, 0x78, 0x12, 0x4d, 0x0a, 0x08, 0x70,
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e,
0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e,
0x68, 0x61, 0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x76, 0x61, 0x67, 0x72, 0x61, 0x6e,
0x74, 0x2e, 0x56, 0x61, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x66, 0x69, 0x6c, 0x65, 0x43, 0x6f, 0x6d,
0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,

View File

@ -65,7 +65,7 @@ message VagrantfileComponents {
bool allow_hosts_modificaion = 2;
string box = 3;
// TODO: CloudInit = 4 (Experimental)
Provider provider = 5;
repeated Provider provider = 5;
// TODO: Disks = 6 (Experimental)
repeated Network networks = 7;
repeated Provisioner provisioners = 8;

View File

@ -35,7 +35,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :allow_fstab_modification, :bool, 1
optional :allow_hosts_modificaion, :bool, 2
optional :box, :string, 3
optional :provider, :message, 5, "hashicorp.vagrant.VagrantfileComponents.Provider"
repeated :provider, :message, 5, "hashicorp.vagrant.VagrantfileComponents.Provider"
repeated :networks, :message, 7, "hashicorp.vagrant.VagrantfileComponents.Network"
repeated :provisioners, :message, 8, "hashicorp.vagrant.VagrantfileComponents.Provisioner"
repeated :synced_folders, :message, 9, "hashicorp.vagrant.VagrantfileComponents.SyncedFolder"