1

Here is my vagrantfile

PROJECT_NAME = "petalandstem"
BACKEND_DIR = "/home/vagrant/#{PROJECT_NAME}/src/backend"
FRONTEND_DIR = "/home/vagrant/#{PROJECT_NAME}/src/frontend"

Vagrant.require_version ">= 1.8.1"
Vagrant.configure(2) do |config|

  config.vm.hostname = PROJECT_NAME
  config.vm.box = "ubuntu/xenial64"

  config.vm.network :private_network, ip: "192.168.0.23"
  config.ssh.forward_agent = true

  config.ssh.port = "22"
  config.ssh.host = '192.168.22.22'
  config.vm.synced_folder "./backend", BACKEND_DIR
  config.vm.synced_folder "./frontend", FRONTEND_DIR

  config.vm.network "forwarded_port", guest: 8000, host: 8000, auto_correct: true
#  config.vm.network "forwarded_port", guest: 2222, host: 22  

  config.vm.provider :virtualbox do |vb|
    vb.name = PROJECT_NAME
    vb.memory = "512"
    vb.cpus = 1
    vb.gui = false
  end

  config.vm.provision "ansible" do |ansible|
    ansible.playbook = "ansible/site.yml"
    ansible.inventory_path = "ansible/vagrant.ini"
    ansible.host_key_checking = false
    ansible.limit = "*"
  end
end

I set up one project through ansible and vagrant, and used virtual box. I have installed everything properly. I started virtual box and I get into vagrant. But I am not able to ping it from local terminal. Can anybody help ?

0

You must log in to answer this question.

Browse other questions tagged .