Hi All,

I have something like this defined in vars which is being passed as 
'instance.volumes' variable later in tasks like this volumes: "{{ 
instance.volumes }}".

instance:
  volumes:
    - device_name: /dev/sda1

And I need in playbook during execution time to replace '/dev/sda1' value 
with dynamically generated value. The below approach doesn't work.
set_fact: instance.volumes[0].device_name="{{ new_root_dev }}"

Is the any way to overwrite a key in dictionary ?

Regards,
Constantin



-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7353d7d1-9c6e-4fe8-8047-bc0f4407af10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to