Vagrantfile
Vagrant configuration file (Ruby)
Vagrant configuration file is Vagrantfile.
Vagrantfile will set the vagrant Box, private IP address, hostname and the document root.
If you launch multiple environments, change the name of the directory. Should rewrite vm_ip and vm_hostname. Note not to overlap with other environments.
You can accesse from a terminal in the same LAN to use the public network to Vagrant virtual environment. To use public networks, set IP address for bridged connection to public_ip. In that case, recommended that configure the same IP address to vm_hostname.
## Vagrant Settings ##
vm_box = 'debian/bullseye64' # Debian 11.0
vm_box_version = '>= 0'
vm_ip = '192.168.46.49'
vm_hostname = 'vaw.local'
vm_document_root = '/var/www/html'
public_ip = ''
forwarded_port = [
3000,
3001,
1025,
8025
]
vbguest_auto_update = true
synced_folder_type = 'virtualbox' # virtualbox|nfs|rsync|smb
backup_database = false
ansible_install = true
ansible_install_mode = :default # :default|:pip
ansible_version = 'latest' # requires :pip in ansible_install_mode
provision_mode = 'all' # all|wordpress|box
vagrant_plugins = [
'vagrant-hostsupdater',
'vagrant-vbguest',
'vagrant-serverspec'
]
vm_box(required) name of Vagrant Box (default:debian/bullseye64)vm_box_version(required) version of Vagrant Box (default:>= 0)vm_ip(required) private IP address (default:192.168.46.49)vm_hostname(required) hostname (default:vaw.local)vm_document_root(required) document root path (default:/var/www/html)- auto create
wordpressdirectory and synchronized
- auto create
public_ipIP address of bridged connection (default:'')forwarded_portlist of ports that you want to transfer (default:[ 3000, 3001, 1025, 8025 ])- 3000: Browsersync auto-detected port
- 3001: Browsersync ui port
- 1025: MailHog SMTP default port
- 8025: MailHog HTTP default port
vbguest_auto_updatewhether to update VirtualBox Guest Additions (default:true/ value:true|false) γγγΎγ (default:true/ value:true|false)synced_folder_typethe type of synced folder (default:virtualbox/ value:virtualbox|nfs|rsync|smb)backup_databaseenable auto database backup when vagrant destroy or halt (default:false/ value:true|false)ansible_install(required) install Ansible (default::true/ value::true|:false)ansible_install_mode(required) the way to install Ansible (default::default/ value::default|:pip)ansible_versionversion of Ansible to install (default:latest)provision_mode(required) Provisioning mode (default:all/ value:all|wordpress|box)vagrant_pluginsinstall vagrant plugins