gpt4 book ai didi

ubuntu - 带有 salt 供应器的 Vagrant 不显示任何输出

转载 作者:太空宇宙 更新时间:2023-11-03 16:48:21 25 4
gpt4 key购买 nike

在创建 vm 时,我不会从 salt 那里得到任何响应,除非你处于冗长模式,此时你的屏幕上会出现闪烁的废话音调,它并不代表很好的信息,如 salt-call 确实如此。

这是你在 vagrant up web 之后得到的结果

192:vagrant-starter holms$ vagrant up web
Bringing machine 'web' up with 'virtualbox' provider...
==> web: Importing base box 'debian80'...
==> web: Matching MAC address for NAT networking...
==> web: Setting the name of the VM: vagrant-starter_web_1410407135596_15907
==> web: Clearing any previously set forwarded ports...
==> web: Clearing any previously set network interfaces...
==> web: Preparing network interfaces based on configuration...
web: Adapter 1: nat
==> web: Forwarding ports...
web: 80 => 9999 (adapter 1)
web: 22 => 2222 (adapter 1)
==> web: Running 'pre-boot' VM customizations...
==> web: Booting VM...
==> web: Waiting for machine to boot. This may take a few minutes...
web: SSH address: 127.0.0.1:2222
web: SSH username: vagrant
web: SSH auth method: private key
web: Warning: Connection timeout. Retrying...
==> web: Machine booted and ready!
==> web: Checking for guest additions in VM...
==> web: Mounting shared folders...
web: /vagrant => /Users/holms/Dropbox/Dev/vagrant-starter
web: /srv/salt => /Users/holms/Dropbox/Dev/vagrant-starter/repo/salt
==> web: Running provisioner: salt...
Copying salt minion config to vm.
Checking if salt-minion is installed
salt-minion was not found.
Checking if salt-call is installed
salt-call was not found.
Bootstrapping Salt... (this may take a while)
Salt successfully configured and installed!
run_overstate set to false. Not running state.overstate.
Calling state.highstate... (this may take a while)

我的 Vagrantfile 非常大,因为它甚至有外部配置。相关部分在这里:

 97         # check if saltstack being used
98 unless opts[:salt].nil?
99
100 config.vm.synced_folder "repo/salt/", "/srv/salt/"
101
102 node.vm.provision "salt" do |salt|
103 salt.minion_config = "repo/minion"
104 salt.run_highstate = true
105 salt.colorize = true
106 salt.log_level = 'all'
107 #salt.verbose = true
108 #opts[:salt].each do |minion|
109 #end
110 end
111 end

我希望看到的是这个 this

我看到的是这样的:

enter image description here

最佳答案

这个是我自己搜索的,这里没有答案,我来补充一下。在 Vagrantfile 中你需要添加(或取消注释)

salt.verbose = true

,所以你最终会得到这样的结果:

  config.vm.provision :salt do |salt|

salt.minion_config = "repo/minion"
salt.run_highstate = true
salt.colorize = true
salt.log_level = "info"
salt.verbose = true

end

根据 https://github.com/mitchellh/vagrant/issues/2678

关于ubuntu - 带有 salt 供应器的 Vagrant 不显示任何输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25778820/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com