问题
Seems to me that most of the existing Ansible modules require vCenter. For example guest_module has required parameter vcenter_hostname. The question is - is there an ability to manage 2-3 vSphere hosts using Ansible? I need creating virtual environments(virtual networks, guest VMs, load balancing endpoints).
I also considered Hyper-v but it doesn't have Ansible modules. Direct powershell management considered as a last resort for Hyper-v.
回答1:
Yes, you can do things that are allowed by free license.
There's a hint in the docs:
For standalone ESXi hosts, ha-datacenter should be used as the datacenter name
I use vsphere_guest
without any problems with standalone hypervisors with the following parameters filled in:
- vsphere_guest:
vcenter_hostname: "{{ esxi_ip_or_dns }}" # ip address of hypervisor
esxi:
datacenter: ha-datacenter
hostname: "{{ esxi_hostname }}" # name shown in hypervisor console
username: "{{ esxi_username }}"
password: "{{ esxi_password }}"
But keep in mind, that many useful features are blocked in free license. For example, you can't clone VMs without vCenter license.
来源:https://stackoverflow.com/questions/43420285/can-i-manage-guest-vms-in-vsphere-free-using-ansible-without-vcenter