# Sorted dynamic inventory

**URL:** <https://community.datagerry.com/t/sorted-dynamic-inventory/580>\
**Category:** Community Support\
**Created:** [April 18, 2024, 9:32pm UTC](https://community.datagerry.com/t/sorted-dynamic-inventory/580 "2024-04-18T21:32:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sklein](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@sklein](https://community.datagerry.com/u/sklein)\
**Post date:** [April 18, 2024, 9:32pm UTC](https://community.datagerry.com/t/sorted-dynamic-inventory/580/1 "2024-04-18T21:32:21Z")

</div>

Hi community,  
if I use datagerry as a source for a dynamic ansible inventory via the provided script, is there a way to get it as a sorted list already from datagerry? For example, if I need the first server, it is always a “| sort | first” in the playbook. Is there another way to achieve this?  
Best regards  
Steffen
