problem with creating logical volumes using dict

Hi,

I'm creating a playbook to deploy several virtual machines on a host.
Each vm has a logical volume as storage backend. One of the tasks in
the playbook is to create the lv's for these machines.

To do this I use a dict containing all parameters for each vm. On the
first run the lv's are created as intended (size is as configured in
dict). The next time I run the playbook I get the message that the
existing lv's cannot be resized while the values haven't been changed.
If I set the value that defines the size for the lv the same for all
items in the dict there are no problems. It seems that only one value
is kept during the run of the playbook.

Following gist might provide some more insight.

https://gist.github.com/vincentvdk/6a708a29fd28cddb4cab

Can this be a bug or am I doing something wrong here?

Regards,
Vincent

So as you know all the dict stuff in Ansible is generic, so what you are having is either a problem with dicts, or a problem with logical volumes.

Minor pet peeve - posting a gist to the mailing list is something I’d consider a bit annoying, as I have to open a tab and then talk about it, when I could reply inline. Then there’s a very large amount of text that I have to skim through to figure out what you’re talking about.

It helps me a lot when things can be boiled down to the specific problem only rather than having to skim the whole gist and point out all the things that might be wrong.

Sorry for meta-commentary, this isn’t so much about you, but just in general.

“DEBUG MY PLAYBOOKS!” is a bit hard for the volume on this list lately.