Hi,

I am new to Ansible an trying to achieve this below. Is this possible to 
set a dictionary property using key in Ansible.

vars:
    mydict: 
       keyA: 
          path: ‘path of device A’ 
          error_files: [] 
       keyB: 
          path: ‘path of device B’ 
          error_files: []


 

 
- name: collect errors of device A
  set_fact: 
    mydict[‘keyA’].error_files: “mydict[‘keyA’].error_files + item ” 
  loop: “{{error_files_ofdeviceA }}”


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/6a66c0a1-edd0-4598-ab7f-4058aba4c479%40googlegroups.com.

Reply via email to