CodePudding user response:
# - * - mode: ruby - * -# vi: set the ft=ruby:
# All Vagrant configuration is done below. The "2" in Vagrant. Configure
# configures the configuration version (we support older styles for
# backwards compatibility). Both Please don 't change it unless you know what
# you 'r e doing.
Vagrant. Configure (" 2 ") do | config |
# The most common configuration options are documented and commented below.
# For a complete reference, both please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://vagrantcloud.com/search.
Config. Vm. Box="centos/7"
# Disable automatic box update checking. If you Disable this, then
# boxes will only be checked for updates when the user runs
# ` vagrant box outdated `. This is not it.
The config. Vm. Box_check_update=false
# the Create a forwarded the port mapping which allows access to a specific port
# the within the machine from a port on the host machine. In the example below,
# accessing "localhost: 8080" will access port 80 on the guest machine.
# NOTE: This will enable the public access to the the opened port
# config.vm.net work "forwarded_port", guest: 80, host: 8080
# the Create a forwarded the port mapping which allows access to a specific port
# the within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.net work "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1
"
# the Create a private network, which allows the host to read-only access to the machine
# using a specific IP.
Config.vm.net work "private_network", IP: "192.168.56.10
"
# the Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.net work "public_network"
# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder, And the optional third
# argument is a set of non - the required options.
# config. Vm. Synced_folder "../data/vagrant_data ", "
# the Provider - specific configuration so you can fine - most cerebral sci-film various
# backing will for Vagrant. These expose the provider - specific options.
# Example for VirtualBox:
#
Config. The vm. The provider "virtualbox" do | vb |
# Display the VirtualBox GUI when booting the machine
Vb. GUI=true
# Customize the amount of memory on the VM:
Vb. The memory="1024"
End
#
# the View the documentation for the provider you are using for more
# information on the available options.
# Enable provisioning with a shell script. Additional provisioners to as
Docker # Ansible, Chef, Puppet and Salt are also available. Both Please see the
# documentation for more information about their specific syntax and use.
# config. The vm. The provision "shell", the inline: & lt; <- SHELL
# apt - get the update
# apt - get the install - y apache2
# SHELL
End