As you know that the module "ansible_facts.packages" collects all the rpm 
packages installed on a host , so we need to sort those packages in 
alphabetical order eg:  aaa_base,  SuSEfirewall2 .. 
        "SuSEfirewall2": [
            {
                "arch": "noarch",
                "epoch": null,
                "name": "SuSEfirewall2",
                "release": "1.33",
                "source": "rpm",
                "version": "3.6.378"
            }
        ],
        "aaa_base": [
            {
                "arch": "x86_64",
                "epoch": null,
                "name": "aaa_base",
                "release": "3.42.1",
                "source": "rpm",
                "version": "84.87+git20180409.04c9dae"
            }
        ],


On Wednesday, June 23, 2021 at 2:45:12 AM UTC+8 [email protected] wrote:

> Request an example for such a data structure
>
> On Tue, 22 Jun 2021 at 19:25, [email protected] <[email protected]> 
> wrote:
> >
> > Hi All,
> >
> > Request your help on how to sort a dict2item "{{ 
> ansible_facts.packages|dict2items }}"
> >
> > --
> > 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-project/07e61cac-a343-4f01-9ee0-5a4c6cd11907n%40googlegroups.com
> .
>
>
>
> -- 
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2c22353d-750c-4f0a-af43-6cbacae0f439n%40googlegroups.com.

Reply via email to