I have a structure that looks like this:
---
Volumes:
- name: data
size: 80
iops: 250
device: /dev/xvdf
type: standard
id: vol-05778cd5
- name: journal
size: 20
iops: 250
device: /dev/xvdg
type: standard
id: vol-59768d89
- name: log
size: 10
iops: 250
device: /dev/xvdh
type: standard
id: vol-6f768dbf
I am creating a script using templating and a portion of that script will
use the data structure above to attach the volumes and then mount them
So the output for the particular section should be something like
attachAndMount /data /dev/xvdf vol-5778cd5
attachAndMount /journal /dev/xvdg vol-59768d89
attachAndMount /log /dev/xvdh vol-6f768dbf
I'm trying to use:
{% for item in {{ Volumes }} %}
attachAndMount {{ item.name }} {{ item.device }} {{ item.id }}
{% endfor %}
But getting errors that indicate that Volumes is the wrong type of data to
use here.
--
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/f9d47bc3-a64a-4bbf-9332-ea3474cea96e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.