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
********************************
Rene Paquin - Systems Administrator
Wilfrid Laurier University
Waterloo, Ontario
(519)884-0710 x3795
rpa...@wlu.ca
Forgot to mention that I am attempting to deploy a windows server.
Rene
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ansible-proje...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/YTXPR0101MB12958F4B26098D55A19B0B06D8629%40YTXPR0101MB1295.CANPRD01.PROD.OUTLOOK.COM.
Figured it out. In the playbook I had a redundant entry - vlan: "{{ vlan }}" Once I removed it all was good.
Thanks for listening.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/YTXPR0101MB1295E57A4E9878C4EFD695F3D8629%40YTXPR0101MB1295.CANPRD01.PROD.OUTLOOK.COM.