# Return Value "results"

**URL:** <https://forum.ansible.com/t/return-value-results/44148>\
**Category:** Project Discussions\
**Tags:** documentation, ansible-core\
**Created:** [July 28, 2025, 10:06am UTC](https://forum.ansible.com/t/return-value-results/44148 "2025-07-28T10:06:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![russoz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/russoz/32/127_2.png) [@russoz](https://forum.ansible.com/u/russoz)\
**Post date:** [July 28, 2025, 10:06am UTC](https://forum.ansible.com/t/return-value-results/44148/1 "2025-07-28T10:06:15Z")

</div>

Hi everyone,

Bringing to the forum a conversation that started in this PR for community.general:

> <https://github.com/ansible-collections/community.general/pull/10485#discussion_r2234000098>
>
> I'm not sure about this comment. I think \`results\` is a perfectly fine return va…lue for modules. If you disagree, maybe this should be a discussion on the forum first?

As you can read over there, @felixfontein raised the possibility of allowing this RV to be used freely by the modules. And I quote:

> In any case, I would start a discussion on this on the forum. I think it’s also valid to adjust the description in [https://docs.ansible.com/ansible/latest/reference\_appendices/common\_return\_values.html#results](https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#results) to allow using results in regular return values.

I think that kinda makes sense, but it would probably make sense to change the “common RV” to something else, like `loop_results`.

We would like to hear from the community and the Ansible Core team about the problem and possible solutions.

---

<div class="post-metadata">

**Author:** ![felixfontein](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/felixfontein/32/7530_2.png) [@felixfontein](https://forum.ansible.com/u/felixfontein)\
**Post date:** [July 28, 2025, 7:38pm UTC](https://forum.ansible.com/t/return-value-results/44148/2 "2025-07-28T19:38:03Z")

</div>

I think it’s fine to use `results` for both. It is not really a ‘common return value’ in the sense that it is decribes a return value of an actual module, but the result of using `loop` (or `with_*`) together with a module - which has a very different structure from a normal module’s result.

Or do we have the assumption somewhere that `results` always means this is a loop result? If that’s the case, the sanity tests should be updated to prevent `results` showing up in documented return values for modules IMO.

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [July 28, 2025, 7:49pm UTC](https://forum.ansible.com/t/return-value-results/44148/3 "2025-07-28T19:49:11Z")

</div>

I think it’s fine to use `results` for both too. Here’s an instance of that in ansible-core too: [ansible/lib/ansible/modules/dnf5.py at devel · ansible/ansible · GitHub](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/dnf5.py#L335-L339).

If it causes confusion, I think it would be less disruptive to rename the module return key instead of changing a common return value. The latter would break content using `loop`/`with_` results regardless of whether they were even using a module that happens to also return `results`.
