gpt4 book ai didi

osx-mountain-lion - Vagrant ansible以下设置不存在: inventory_file

转载 作者:行者123 更新时间:2023-12-04 03:27:59 24 4
gpt4 key购买 nike

我已经撤消了一个git repo并让我无所事事,但我收到了此错误消息

The following settings don't exist: inventory_file

我已经安装了虚拟盒子,对于OSX山狮已经无所适从了。

但是我什么也无法工作。

当我运行 ansible all -m ping -vvvv时,我也会得到
<192.168.0.62> ESTABLISH CONNECTION FOR USER: Grant
<192.168.0.62> EXEC ['ssh', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/Users/Grant/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', '192.168.0.62', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-1379790346.17-244145524385544 && chmod a+rx $HOME/.ansible/tmp/ansible-1379790346.17-244145524385544 && echo $HOME/.ansible/tmp/ansible-1379790346.17-244145524385544'"]
192.168.0.62 | FAILED => SSH encountered an unknown error. The output was:
OpenSSH_5.9p1, OpenSSL 0.9.8y 5 Feb 2013
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: auto-mux: Trying existing master
debug1: Control socket "/Users/Grant/.ansible/cp/ansible-ssh-192.168.0.62-22-Grant" does not exist
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.0.62 [192.168.0.62] port 22.
debug2: fd 3 setting O_NONBLOCK
debug1: connect to address 192.168.0.62 port 22: Operation timed out
ssh: connect to host 192.168.0.62 port 22: Operation timed out

关于正在发生的事情的任何想法将不胜感激:)

最佳答案

对于inventory_file问题,请尝试将Vagrantfile更改为改为使用inventory_path。我认为这种微妙的变化发生在Vagrant 1.3.x中。如果您不想修改Vagrantfile,请尝试使用Vagrant1.2.x。

运行时:

ansible all -m ping -vvvv

这将使用您当前的用户,并在Ansible主机 list ( /etc/ansible/hosts)的默认位置中查找。

为了使其与Vagrant定义的VM一起使用,您需要使用 vagrant用户,指定在连接期间要使用的SSH key ,并指定主机 list 的位置,例如
ansible all \
-i provisioning/inventory # <-- or wherever the inventory is \
-m ping \
-u vagrant \
--private-key ~/.vagrant.d/insecure_private_key

关于osx-mountain-lion - Vagrant ansible以下设置不存在: inventory_file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18937680/

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