没有esxi的安全的vm

我们的vSphere限制设置是这样devise的:工程师可以在资源池中创build,但不在esxi主机上(这很好)。 但是,为了创build一个客户虚拟机在一个合理的剧本中,我必须指定esxi主机,数据中心等。当我这样做 – 它失败,缺乏权限(这是预期的)问题是 – 我怎么可以编写游戏虚拟机的剧本没有提到esxivariables?

Playbook在这里:

--- - name: Create a VM in OA resource pool hosts: localhost connection: local gather_facts: False tasks: - name: create VM vsphere_guest: vcenter_hostname: virtualcenter.example.com validate_certs: no username: '{{ user }}' password: '{{ password }}' guest: '{{ guest }}' state: powered_off vm_extra_config: vcpu.hotadd: yes mem.hotadd: yes notes: This is a test VM vm_disk: disk1: size_gb: 10 type: thick datastore: datastore vm_nic: nic1: type: vmxnet3 network: vlan1 network_type: standard vm_hardware: memory_mb: 1024 num_cpus: 1 osid: centos64Guest scsi: paravirtual resource_pool: "/Resources/my_resource_pool" esxi: datacenter: site01 hostname: esx1.example.com