Currently on version 2.10.6 and installed the community vmware collection and dependencies. I am running the playbook below and getting this error:
“msg”: “TypeError was returned, please ensure to give correct inputs. Field "ip" is not optional”.
Not sure what I am missing here. Any help is appreciated,
Thanks,
- hosts: localhost
gather_facts: no
vars_files:
-
group_vars/vars
-
group_vars/vars_sec
tasks:
- name: Clone the template
community.vmware.vmware_guest:
hostname: “{{ vcenter_server }}”
username: “{{ vcenter_user }}”
password: “{{ vcenter_pass }}”
validate_certs: False
name: “{{ name }}”
template: “{{ template }}”
datacenter: “{{ datacenter_name }}”
folder: “{{ folder }}”
cluster: “{{ cluster_name }}”
datastore: “{{ datastore }}”
networks:
- name: “{{ network }}”
ip: “{{ ip }}”
netmask: 255.255.254.0
gateway: “{{ gw }}”
dns_servers:
-
10.10.82.255
-
10.100.46.20
-
vlan: “{{ vlan }}”
type: static
state: poweredon
wait_for_ip_address: yes
delegate_to: localhost
register: deploy_vm