Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (47 sloc) 1.63 KB
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
os = "bento/ubuntu-16.04"
net_ip = "192.168.50.22"
# mysql config
mysql_super_passwd = "hola"
mysql_wordpress_database = "wordpress"
mysql_wordpress_username = "wordpress_user"
mysql_wordpress_password= "greetings"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
vb.cpus = 2
vb.name = "wordpress-machine"
end
config.vm.network "public_network",
use_dhcp_assigned_default_route: true
config.vm.box = "#{os}"
config.vm.host_name = "wordpress-test"
config.vm.network "private_network", ip: "#{net_ip}"
config.vm.provision "shell",
inline: "apt-get update"
config.vm.provision "file",
source: "wordpress_nginx.conf",
destination: "/tmp/wordpress_nginx.conf"
config.vm.provision "shell",
path: "install_nginx.sh",
privileged: "true"
config.vm.provision "shell",
path: "install_mysql.sh",
privileged: "true",
env: {"SUPER_PASSWORD" => "#{mysql_super_passwd}",
"DB" => "#{mysql_wordpress_database}",
"USER" => "#{mysql_wordpress_username}",
"PASSWD" => "#{mysql_wordpress_password}",
}
config.vm.provision "shell",
path: "install_php.sh",
privileged: "true"
config.vm.provision "shell",
path: "setup_wordpress.sh",
privileged: "false",
env: {"DB" => "#{mysql_wordpress_database}",
"USER" => "#{mysql_wordpress_username}",
"PASSWD" => "#{mysql_wordpress_password}",
}
end