Hi,

I'm trying to update custom attributes for existing VMware VMs using 
Ansible.  I spent quite a bit of time testing, but I can't seem to get it 
working.

*---*


*- hosts: vcenter_hosts*

*  gather_facts: False*

*  connection: local*


*  vars_files:*

*    - ./vars/jg_vars_file.yml*


*  tasks:*

*- name: "Add multiple virtual machine custom attributes"*

*  vmware_guest_custom_attributes:*

*    hostname: "{{ hostname }}"*

*    username: "{{ username }}"*

*    password: "{{ password }}"*

*    moid: My-VM-Name*

*    state: present*

*    attributes:*

*      - name: creator*

*        value: "Me"*

*      - name: purpose*

*        value: "DEV VM"*

*  delegate_to: localhost*

*  register: attributes*

Am I missing something or should this work?


ERROR! 'delegate_to' is not a valid attribute for a Play


The error appears to be in '/home/ansible/create-vm-attributes.yml': line 
28, column 3, but may

be elsewhere in the file depending on the exact syntax problem.


The offending line appears to be:



- name: "Add multiple virtual machine custom attributes"

  ^ here


Thanks

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5e44f38c-4a5b-4845-b1ae-2c1862400a8e%40googlegroups.com.

Reply via email to