Advertisement
Guest User

Untitled

a guest
May 6th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. VAGRANTFILE
  2. #
  3. # Vagrantfile per un singolo nodo (node), con Oracle Java.
  4. #
  5.  
  6. VAGRANTFILE_API_VERSION = "2"
  7.  
  8. Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  9. # Configurazioni comuni.
  10.  
  11. # Ubuntu trusty 64 VirtualBox.
  12. config.vm.box = "ubuntu/trusty64"
  13. # config.vm.box_url = "http://files.vagrantup.com/ubuntu/trusty64.box"
  14.  
  15.  
  16. # folder per le risorse condivise
  17.  
  18. config.vm.synced_folder "www/", "/var/www/html", :mount_options => ["dmode=777", "fmode=777"]
  19.  
  20.  
  21. #
  22. # Configurazione del nodo "node", che prevede:
  23. # - Apache con php5
  24. #
  25. config.vm.define "node" do |node|
  26. node.vm.hostname = "node"
  27. node.vm.network "private_network", ip: "10.11.1.201", virtualbox__intnet: true
  28.  
  29. node.vm.provider "virtualbox" do |v|
  30. v.memory = 1024
  31. end
  32.  
  33. node.vm.network "forwarded_port", guest: 22, host: 2221, id: 'ssh', auto_correct: true
  34. node.vm.network "forwarded_port", guest: 80, host: 80, id: 'http', auto_correct: true
  35. node.ssh.forward_agent = true
  36.  
  37.  
  38. config.vm.provision :puppet do |puppet|
  39. puppet.manifests_path = "puppet/manifests"
  40. puppet.manifest_file = "init.pp"
  41. end
  42.  
  43. end
  44. end
  45.  
  46. -----------------------------------
  47. init.pp
  48.  
  49.  
  50. package { ['apache2', 'libapache2-mod-php5']:
  51. ensure => present;
  52. }
  53.  
  54. service { 'apache2':
  55. ensure => running,
  56. require => Package['apache2'];
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement