EPESI BIM • Business Information Manager • Cloud CRM/ERP http://epe.si/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

84 lines
3.5 KiB

  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. # All Vagrant configuration is done below. The "2" in Vagrant.configure
  4. # configures the configuration version (we support older styles for
  5. # backwards compatibility). Please don't change it unless you know what
  6. # you're doing.
  7. Vagrant.configure("2") do |config|
  8. # The most common configuration options are documented and commented below.
  9. # For a complete reference, please see the online documentation at
  10. # https://docs.vagrantup.com.
  11. # Every Vagrant development environment requires a box. You can search for
  12. # boxes at https://vagrantcloud.com/search.
  13. config.vm.box = "ubuntu/trusty64"
  14. # Disable automatic box update checking. If you disable this, then
  15. # boxes will only be checked for updates when the user runs
  16. # `vagrant box outdated`. This is not recommended.
  17. # config.vm.box_check_update = false
  18. # Create a forwarded port mapping which allows access to a specific port
  19. # within the machine from a port on the host machine. In the example below,
  20. # accessing "localhost:8080" will access port 80 on the guest machine.
  21. # NOTE: This will enable public access to the opened port
  22. # config.vm.network "forwarded_port", guest: 80, host: 8080
  23. # Create a forwarded port mapping which allows access to a specific port
  24. # within the machine from a port on the host machine and only allow access
  25. # via 127.0.0.1 to disable public access
  26. # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
  27. # Create a private network, which allows host-only access to the machine
  28. # using a specific IP.
  29. config.vm.network "private_network", type: "dhcp"
  30. # Create a public network, which generally matched to bridged network.
  31. # Bridged networks make the machine appear as another physical device on
  32. # your network.
  33. # config.vm.network "public_network"
  34. # Share an additional folder to the guest VM. The first argument is
  35. # the path on the host to the actual folder. The second argument is
  36. # the path on the guest to mount the folder. And the optional third
  37. # argument is a set of non-required options.
  38. # config.vm.synced_folder "../data", "/vagrant_data"
  39. config.vm.synced_folder ".", "/var/www/epesi", owner: "www-data", group: "www-data"
  40. config.vm.synced_folder ".", "/vagrant"
  41. # Provider-specific configuration so you can fine-tune various
  42. # backing providers for Vagrant. These expose provider-specific options.
  43. # Example for VirtualBox:
  44. #
  45. # config.vm.provider "virtualbox" do |vb|
  46. # # Display the VirtualBox GUI when booting the machine
  47. # vb.gui = true
  48. #
  49. # # Customize the amount of memory on the VM:
  50. # vb.memory = "1024"
  51. # end
  52. #
  53. # View the documentation for the provider you are using for more
  54. # information on available options.
  55. # Enable provisioning with a shell script. Additional provisioners such as
  56. # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
  57. # documentation for more information about their specific syntax and use.
  58. # config.vm.provision "shell", inline: <<-SHELL
  59. # apt-get update
  60. # apt-get install -y apache2
  61. # SHELL
  62. config.vm.provision "ansible_local" do |ansible|
  63. ansible.playbook = "playbook.yml"
  64. ansible.compatibility_mode = "2.0"
  65. end
  66. config.vm.provision "shell", privileged: false, inline: <<-EOF
  67. echo "Congratulations! Vagrant machine is provisioned!"
  68. echo "Now setup Your Epesi http://$(facter -p ipaddress_eth1)"
  69. echo "Database credentials: admin:$(cat /vagrant/mysqlpassword)"
  70. EOF
  71. end