在Windows Vagrant图片中运行Ansible Playbook时,输出如下:
==> default: Machine booted and ready!
Sorry, don't know how to check guest version of Virtualbox Guest Additions on this platform. Stopping installation.
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 5.1.12
default: VirtualBox Version: 5.2
==> default: Mounting shared folders...
default: /vagrant => /Users/aaron.west/Workspace/hss-iaas/ansible-repo/tmp
==> default: Running provisioner: ansible_local...
`playbook` does not exist on the guest: /vagrant/test/local.yml
可以在以下位置找到该剧本:https://galaxy.ansible.com/lean_delivery/java
而我正在使用的流浪Windows Server 2016映像是:mwrock/Windows2016
剧本看起来像:
- hosts: local
gather_facts: yes
connection: local
become: yes
become_user: root
roles:
- ../roles/java
答案 0 :(得分:0)
Running provisioner: ansible_local
– Vagrant尝试在来宾内部 执行剧本。
您可能希望重构您的剧本以与ansible预配器一起使用。
答案 1 :(得分:0)
按照ansible_local
documentation:
Ansible Local提供商要求所有Ansible Playbook 来宾计算机上的文件位于以下位置: Provisioning_path选项。通常这些文件最初是 存在于主机上(作为Vagrant项目的一部分),并且 与Vagrant Synced Folder共享它们非常容易。
为此,请添加以下内容:
=INDEX($A$220:$Z$104606, MATCH(1,($C$220:$C$104606=$C6)*($K$220:$K$104606=$F$1)*($R$220:$R$104606=$F$3)*($P$220:$P$104606=$F$2),0),21)
This configuration与来宾在主机上的“ / vagrant” 文件夹中的主机共享vagrant文件夹,从错误消息中可以看出,该文件夹似乎在寻找剧本得到。