Created
September 23, 2012 03:37
-
-
Save rogeriopradoj/3768755 to your computer and use it in GitHub Desktop.
Vagrant: O que, Por que e Como - Passo 4 - 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
config.vm.box = "precise32" | |
config.vm.box_url = "http://files.vagrantup.com/precise32.box" | |
# Assign this VM to a host-only network IP, allowing you to access it | |
# via the IP. Host-only networks can talk to the host machine as well as | |
# any other machines on the same network, but cannot be accessed (through this | |
# network interface) by any external networks. | |
config.vm.network :hostonly, "192.168.33.10" | |
# Set the default project share to use nfs | |
config.vm.share_folder("v-web", "/vagrant/www", "./www", :nfs => true) | |
config.vm.share_folder("v-db", "/vagrant/db", "./db", :nfs => true) | |
# Forward a port from the guest to the host, which allows for outside | |
# computers to access the VM, whereas host only networking does not. | |
config.vm.forward_port 80, 8080 | |
# Set the Timezone to something useful | |
config.vm.provision :shell, :inline => "echo \"Europe/London\" | sudo tee /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata" | |
# Update the server | |
config.vm.provision :shell, :inline => "apt-get update --fix-missing" | |
# Enable Puppet | |
config.vm.provision :puppet do |puppet| | |
puppet.facter = { "fqdn" => "local.pyrocms", "hostname" => "www" } | |
puppet.manifests_path = "puppet/manifests" | |
puppet.manifest_file = "ubuntu-apache2-pgsql-php5.pp" | |
puppet.module_path = "puppet/modules" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment