代码之家  ›  专栏  ›  技术社区  ›  aphexlog

当用游荡机器测试时,抛出“游戏者身上不存在剧本”

  •  0
  • aphexlog  · 技术社区  · 7 年前

    在windows vagrant image中运行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

    mwrock/Windows2016

    剧本看起来像:

    - hosts: local
      gather_facts: yes
      connection: local
      become: yes
      become_user: root
      roles:
        - ../roles/java
    
    0 回复  |  直到 7 年前
        1
  •  0
  •   Konstantin Suvorov    7 年前

    Running provisioner: ansible_local 所以流浪汉试图执行剧本 里面

    您可能需要重构剧本来使用 ansible

        2
  •  0
  •   Steven Jeuris    7 年前

    根据 ansible_local documentation :

    要求所有的行动手册 文件可在来宾计算机上的指定位置获取 配置路径选项 . 通常这些文件最初是 很容易与一个不稳定的同步文件夹共享它们。

    为此,请添加以下内容:

    config.vm.synced_folder ".", "/vagrant"
    

    This configuration “/流浪汉”