【问题标题】:using Ansible with VMware ESXi Server将 Ansible 与 VMware ESXi 服务器一起使用
【发布时间】:2017-10-01 04:36:09
【问题描述】:

我想通过 Ansible 在 ESXi 服务器上自动创建 VM。我应该在 VMWare ESXi Server 上安装 pysphere 模块。但是这个服务器不使用 apt、yum 或 easy-install。即使我尝试使用 shell 命令,也会收到与 ESXi 服务器上的依赖关系相关的错误。有没有可用的解决方法?

【问题讨论】:

    标签: ansible vmware esxi


    【解决方案1】:

    我应该在 VMWare ESXi Server 上安装 pysphere 模块

    你为什么这么认为?

    通常你会从你的 Ansible 控制主机 (localhost) 调用像 vsphere_guest 这样的 VM 配置模块,所以 pysphere 应该安装在你的 localhost 上,而不是 ESXi 服务器上。

    例子:

    - hosts: localhost
      tasks:
        - vsphere_guest:
          vcenter_hostname: vcenter.mydomain.local
          username: myuser
          password: mypass
          guest: newvm001
          state: absent
          force: yes
    

    【讨论】:

      猜你喜欢
      • 2010-10-16
      • 2010-09-14
      • 1970-01-01
      • 2020-04-21
      • 2016-12-12
      • 1970-01-01
      • 2021-11-28
      • 1970-01-01
      • 2012-06-08
      相关资源
      最近更新 更多