I have this in my group_vars:

hotfixes-6_2_0: 
  XS62ESP1003: 
    dl_file: XS62ESP1003.zip
    dl_path: "http://downloadns.citrix.com.edgesuite.net/akdlm/9031/";
  XS62ESP1005: 
    dl_file: XS62E005.zip
    dl_path: "http://downloadns.citrix.com.edgesuite.net/akdlm/8197/";
  XS62ESP1009: 
    dl_file: XS62E009.zip
    dl_path: "http://downloadns.citrix.com.edgesuite.net/akdlm/8452/";

My play says:

---
- name: download xenserver hotfixes
  get_url: url="{{ item.value.dl_file }}{{ item.value.dl_path }}" 
dest="/tmp/{{ item.value.dl_path }}" mode=0440 force=no
  with_dict: hotfixes-6_2_0

but I get an error:

with_dict expects a dict


but it looks identical to the syntax in the example in the 
documentation http://docs.ansible.com/playbooks_loops.html#looping-over-hashes

what have I missed?


Many thanks


Paul Angus.
@cloudyangus




http://docs.ansible.com/playbooks_loops.html#looping-over-hashes:

---
users:
  alice:
    name: Alice Appleworth
    telephone: 123-456-7890
  bob:
    name: Bob Bananarama
    telephone: 987-654-3210

 And you want to print every user’s name and phone number. You can loop 
through the elements of a hash using with_dict like this:

tasks:
  - name: Print phone records
    debug: msg="User {{ item.key }} is {{ item.value.name }} ({{ 
item.value.telephone }})"
    with_dict: users


-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/5f281e99-1053-48f8-9c04-d63564cdfd6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to