Мне нужно протестировать несколько форм с моей локальной машины с помощью vagrant. Но проблема в том, что я не могу найти способ подключения к удаленному SMTP, используя мой бродячий ящик. На моем "живом" сайте все работает хорошо, но я не хочу развертывать каждый раз, когда я делаю изменения.

Я перепробовал много вещей, public_network с DHCP, "--nicpromisc2", "allow-all" ....

Я не могу заставить его работать, есть ли какой-нибудь Бродячий Гуру, чтобы помочь мне с этим?

Спасибо !

Вот мой бродяга

# -*- mode: ruby -*-
# vi: set ft=ruby :

require 'yaml'

current_dir    = File.dirname(File.expand_path(__FILE__))
configs        = YAML.load_file("#{current_dir}/deploy/group_vars/all")
vagrant_config = configs


# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|

  # The most common configuration options are documented and commented below.
  # For a complete reference, please see the online documentation at
  # https://docs.vagrantup.com.

  if Vagrant.has_plugin?("vagrant-cachier")
    # Configure cached packages to be shared between instances of the same base box.
    config.cache.scope = :box
    config.cache.synced_folder_opts = {
      type: :nfs
    }
  end

  # Every Vagrant development environment requires a box. You can search for
  # boxes at https://atlas.hashicorp.com/search.
  config.vm.box = "ubuntu/trusty64"

  # Create a forwarded port mapping which allows access to a specific port
  # within the machine from a port on the host machine. In the example below,
  # accessing "localhost:8080" will access port 80 on the guest machine.
  config.vm.network "forwarded_port", guest: 80, host: 8080

  # Create a private network, which allows host-only access to the machine
  # using a specific IP.
  config.vm.network "private_network", ip: "192.168.33.10"

  # Share an additional folder to the guest VM. The first argument is
  # the path on the host to the actual folder. The second argument is
  # the path on the guest to mount the folder. And the optional third
  # argument is a set of non-required options.
  config.vm.synced_folder "./public_html/", "/var/www/html"
  config.vm.synced_folder "./tools", "/var/www/html/tools"

    config.hostmanager.enabled = true
    config.hostmanager.manage_host = true
    config.hostmanager.ignore_private_ip = false
    config.hostmanager.include_offline = true
    config.vm.define 'default' do |node|
      node.vm.hostname = vagrant_config['hostname']
      node.vm.network :private_network, ip: '192.168.33.10'
      node.hostmanager.aliases = [ 'www.' + vagrant_config['hostname'] ]
    end

    config.vm.provider :virtualbox do |vb|
         vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
         vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
    end


  # Enable provisioning with a shell script. Additional provisioners such as
  # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
  # documentation for more information about their specific syntax and use.
  config.vm.provision "ansible" do |ansible|

    ansible.playbook = "deploy/site.yml"
    # ansible.inventory_path = "deploy/inventory/development"
    ansible.limit = "default"
    ansible.groups = {
      "webservers" => ["default"],
      "dbservers" => ["default"]
    }
    ansible.sudo = true
    #ansible.verbose = "vvvvv"
  end
end

0