vagrant

How to run an ansible playbook on a specific vagrant host

最后都变了- 提交于 2019-12-24 11:09:59
问题 I have a Vagrantfile which creates 3 servers. I have two ansible playbooks. playbook1 should be executed on every server first. The second playbook2 should only be executed on server1 and not on server2 and server3. How can I manage this with my Vagrantfile? Vagrant.configure("2") do |config| config.vm.box = "ubuntu/bionic64" config.vm.define "server1" do |server1| // end config.vm.define "server2" do |server2| // end config.vm.define "server3" do |server3| // end config.vm.provision "ansible

Unable to use vagrant ssh on a custom box

社会主义新天地 提交于 2019-12-24 08:07:07
问题 I have successfully created a custom Vagrant box, based on the official ubuntu/xenial64 Vagrant box, but I get this message when I attempt to use vagrant ssh : ==> default: The machine you're attempting to SSH into is configured to use ==> default: password-based authentication. Vagrant can't script entering the ==> default: password for you. If you're prompted for a password, please enter ==> default: the same password you have configured in the Vagrantfile. The only change to the box is to

Store everything from a vagrant box

[亡魂溺海] 提交于 2019-12-24 05:53:15
问题 I have a vagrant box (ubuntu 16.04) for development, and I made several apt install and some change to config files ( .ini , .cnf , etc.) after initializing it. Now, I am OK with this box and its content. I want to save it before destroying everything by mistake. I read this but I'm not sure to understand if it's really what I need. Does a snapshot store eveything? I mean does it save each installed programs, each edited conf and each files added in the shared /vagrant dir? Doc speaks about

Laravel + Vagrant = Access denied for user 'root'@'localhost'

隐身守侯 提交于 2019-12-24 05:35:13
问题 I've seen that many users here on stackoverflow have a similar issue but following the answers I'm not able to make it work. When I run: php artisan migrate I get: [PDOException] SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: NO) This is my app/config/app.php 'mysql' => array( 'driver' => 'mysql', 'host' => 'localhost', 'database' => 'mio_sito', 'username' => 'root', 'password' => '', 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', ),

How to emulate Internet in multi machine environment with Vagrant

非 Y 不嫁゛ 提交于 2019-12-24 04:31:36
问题 I'm creating a vagrant multi machine configuration file. Here is a chunk: Vagrant.configure(2) do |config| config.vm.box = "chef/centos-7.0" config.vm.define "radius" do |radius| radius.vm.hostname = "radius-server" end config.vm.define "mysql" do |mysql| mysql.vm.hostname = "mysql-server" end end how can I emulate the situation in which the above two virtual machines are in different networks separated by Internet? I could create two different private networks having two different private ip

How to emulate Internet in multi machine environment with Vagrant

荒凉一梦 提交于 2019-12-24 04:31:25
问题 I'm creating a vagrant multi machine configuration file. Here is a chunk: Vagrant.configure(2) do |config| config.vm.box = "chef/centos-7.0" config.vm.define "radius" do |radius| radius.vm.hostname = "radius-server" end config.vm.define "mysql" do |mysql| mysql.vm.hostname = "mysql-server" end end how can I emulate the situation in which the above two virtual machines are in different networks separated by Internet? I could create two different private networks having two different private ip

Win 8.1, Vagrant, Chef, Ubuntu, Ember-cli, ember new “npm ERR! tar.unpack untar error /home/vagrant/.npm/”

安稳与你 提交于 2019-12-24 04:12:47
问题 I'm on Windows 8.1, with vagrant, Cheffile and everything works. Now I'm doing: npm install -g ember-cli and it's ok. But when I do this: ember new sample in vagrant folder (the same folder I can view in Windows) I receive this error: version: 1.13.8 Could not find watchman, falling back to NodeWatcher for file system events. Visit http://www.ember-cli.com/user-guide/#watchman for more info. installing app create .bowerrc create .editorconfig create .ember-cli create .jshintrc create .travis

Vagrant shell and ansible provisioning fail with bitbucket

左心房为你撑大大i 提交于 2019-12-24 03:24:06
问题 I can't force vagrant provisioning to clone private git repos from bitbucket. I have vagrant 1.6.3. Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.ssh.private_key_path = "~/.vagrant.d/insecure_private_key" config.ssh.forward_agent = true config.vm.define "abox" do |abox| abox.vm.box = "ubuntu/trusty32" abox.vm.hostname = "abox" abox.ssh.forward_agent = true abox.vm.network "private_network", ip: "192.168.50.4" abox.vm.network "forwarded_port", guest: 22, host: 2233 abox.vm

Provider docker not found - Vagrant

廉价感情. 提交于 2019-12-24 02:43:20
问题 Whenever I run vagrant up --provider=docker , I get this error message. The provider 'docker' could not be found, but was requested to back the machine 'default'. But, when i run Docker himself, without vagrant everything works fine. I'm on Linux Mint Rebecca. All is updated. Vagrantfile # -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

Cannot access localhost:8080 from laravel

大憨熊 提交于 2019-12-24 02:13:37
问题 I have a PHP application running on homestead box. This application makes calls to another app that is running on glassfish on my localhost:8080. When PHP application sends the request to localhost:8080, I am getting following error: ConnectException in RequestException.php line 49: cURL error 7: Failed to connect to localhost port 8080: Connection refused Still I can make calls to localhost:8080 from web browser.Anyone has any suggestion? 回答1: Seeing how your application is running in