我已经尝试过所有我能想到的方法,它拒绝在VM上设置“定制值”。
- name: Cloning VM
vmware_guest:
validate_certs: no
hostname: "{{ vcenterhostname }}"
username: "{{ vcusername }}"
...
template: "{{ item.key }}"
name: new_vm0001
customvalues:
- remotedisplay.vnc.port: 6021
state: restarted
when:
- item.key | search('-sourcevm')
with_dict: "{{ vmfacts.virtual_machines }}"
delegate_to: localhost是否有人能够成功地设置自定义值?
使用ansible 2.4,我认为它可能会被破坏,但更有可能的是,我没有正确的语法。
发布于 2017-10-20 01:25:06
vmware_guest模块手册customvalues定义了要在VM上设置的自定义值列表。自定义值对象包含两个字段,另一个字段是key和value。https://serverfault.com/questions/879360
复制相似问题