Thanks. I have many more fields defined for patch other than patch_name. In
that case, it would be difficult to use with_items right.. or Is there a
solution with list and with_items ?
patches:
patch1:
patch_name:
patch_md5:
engine:
Services:
patch2:
patch_name:
patch_md5:
engine:
services:
patch3:
patch_name:
patch_md5:
engine:
services:
On Tuesday, December 13, 2016 at 12:28:51 AM UTC+5:30, Anand Buddhdev wrote:
>
> 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/6f426023-e58f-4c30-8af6-2d2fe6430286%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.