Hello Deepa,

Dictionaries are *not* ordered collections. You should never rely on items 
in a dictionary to be returned in order. You'd be better off using a list.

patches:
- patchdata1
- patchdata2

A list preserves order.

On Monday, 12 December 2016 15:37:22 UTC+1, Deepa Yr wrote:
>
> Hi
>
>           I have a dict where I need to install patches in the order
>
> patches:
>     patch1:
>         patch_name:
>    patch2:
>         patch_name:
>    patch3:
>         patch_name:
>   and so on
>    patch8:
>         patch_name:
>
>
> - name: install patches
>   include: install_patch.yml
>   with_dict: {{patches}}
>
> When I run above playbook, the order is not as I have defined. It is 
> taking patch8,patch1,patch2.. patch7.
>
> Can you please suggest how I can run in the order.
>
> Thanks
> Deepa
>

-- 
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/3aafa540-634d-400e-bf7b-7d35e5e30cb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to