vmware template deployment issue

49 views
Skip to first unread message

Rene Paquin

unread,
Mar 25, 2021, 11:09:47 AM3/25/21
to ansible...@googlegroups.com

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

 

Rene Paquin

unread,
Mar 25, 2021, 11:18:56 AM3/25/21
to ansible...@googlegroups.com

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.

Rene Paquin

unread,
Mar 25, 2021, 11:38:47 AM3/25/21
to ansible...@googlegroups.com

Figured it out.  In the playbook I had a redundant entry        - vlan: "{{ vlan }}"  Once I removed it all was good.

 

Thanks for listening.

Reply all
Reply to author
Forward
0 new messages