Guest User

Untitled

a guest
Apr 19th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. Vagrant.configure("2") do |config|
  2.  
  3. config.vm.box = "centos-7.3-x86_64_latest.box"
  4. config.vm.box_url = "http://nas.my-compamy.intern/centos-7.3-x86_64_latest.box"
  5.  
  6. config.vm.hostname = "login.my-cloud.dev"
  7. config.vm.network "private_network", ip: "192.168.33.240"
  8.  
  9. # enable to use synced folders
  10. # config.vm.synced_folder "/my/local/path", "/var/www/cce_login", disabled: true
  11.  
  12. config.ssh.forward_agent = true
  13. config.ssh.keep_alive = true
  14. config.ssh.username = "vagrant"
  15. config.ssh.password = "vagrant"
  16.  
  17. config.vm.provider :virtualbox do |v|
  18. # workaround as some virtualbox version seem to disconnect the NAT adapter
  19. v.customize ['modifyvm', :id, '--cableconnected1', 'on']
  20.  
  21. v.memory = 1024
  22. v.cpus = 2
  23. v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
  24. v.customize ["modifyvm", :id, "--name", "login.cce-cloud.dev"]
  25. v.customize ["modifyvm", :id, "--accelerate3d", "off"]
  26. v.customize ["modifyvm", :id, "--accelerate2dvideo", "off"]
  27. v.customize ["modifyvm", :id, "--cpuexecutioncap", "75"]
  28. v.customize ["modifyvm", :id, "--largepages", "on"]
  29. end
  30.  
  31. config.vm.provision "ansible" do |ansible|
  32. ansible.playbook = "ansible/site.yml"
  33. ansible.verbose = "vvv"
  34. end
  35.  
  36. $ vagrant up --provision
  37.  
  38. $ vagrant ssh
  39.  
  40. $ ping 192.168.33.240
  41.  
  42. PING 192.168.33.240 (192.168.33.240) 56(84) bytes of data.
  43. From 192.168.33.1 icmp_seq=1 Destination Host Unreachable
  44. From 192.168.33.1 icmp_seq=2 Destination Host Unreachable
  45. From 192.168.33.1 icmp_seq=3 Destination Host Unreachable
  46.  
  47. $ ifconfig
  48.  
  49. enxdc9b9cee07b2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  50. inet 192.168.111.198 netmask 255.255.255.0 broadcast 192.168.111.255
  51. inet6 fe80::f0ad:1d52:8e55:7fc7 prefixlen 64 scopeid 0x20<link>
  52. ether dc:9b:9c:ee:07:b2 txqueuelen 1000 (Ethernet)
  53. RX packets 11159 bytes 4878538 (4.8 MB)
  54. RX errors 0 dropped 0 overruns 0 frame 0
  55. TX packets 8289 bytes 2106425 (2.1 MB)
  56. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  57.  
  58. lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
  59. inet 127.0.0.1 netmask 255.0.0.0
  60. inet6 ::1 prefixlen 128 scopeid 0x10<host>
  61. loop txqueuelen 1000 (Local Loopback)
  62. RX packets 1607 bytes 173261 (173.2 KB)
  63. RX errors 0 dropped 0 overruns 0 frame 0
  64. TX packets 1607 bytes 173261 (173.2 KB)
  65. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  66.  
  67. vboxnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
  68. inet 192.168.33.1 netmask 255.255.255.0 broadcast 192.168.33.255
  69. inet6 fe80::800:27ff:fe00:0 prefixlen 64 scopeid 0x20<link>
  70. ether 0a:00:27:00:00:00 txqueuelen 1000 (Ethernet)
  71. RX packets 0 bytes 0 (0.0 B)
  72. RX errors 0 dropped 0 overruns 0 frame 0
  73. TX packets 170 bytes 18067 (18.0 KB)
  74. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Add Comment
Please, Sign In to add comment