you need to use with_dict instead of with_items 

so you vars declaration would look like :

---
ansible_mounts:
    mount1:
      mount: /some/mount/point
      device: some_device
      fstype: some_type
     opts: "some options here"
    mount2:
      mount: /another/mount/point
      device: another_device
      fstype: another_type
     opts: "some other options here"



And your task would look like :

- name: Secure Mount options

  mount: name={{ item.mount }} src='{{ item.device }}' state=present fstype
={{ item.fstype }} opts={{ item.opts }}
  with_dict: ansible_mounts




-- 
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/5c22ba1b-4a8b-42c5-a6c1-4c9586d418a7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to