# what is ansible.builtin.file vs just file module

**URL:** <https://forum.ansible.com/t/what-is-ansible-builtin-file-vs-just-file-module/38536>\
**Category:** Ansible Project\
**Created:** [October 20, 2023, 10:26am UTC](https://forum.ansible.com/t/what-is-ansible-builtin-file-vs-just-file-module/38536 "2023-10-20T10:26:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sameer\_Modak](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sameer_modak/32/5180_2.png) [@Sameer\_Modak](https://forum.ansible.com/u/Sameer_Modak)\
**Post date:** [October 20, 2023, 10:26am UTC](https://forum.ansible.com/t/what-is-ansible-builtin-file-vs-just-file-module/38536/1 "2023-10-20T10:26:40Z")

</div>

Hello Team,

I just want to know why we have builtin for all modules in ansible earlier it was just module name

---

<div class="post-metadata">

**Author:** ![Walter\_Rowe](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/walter_rowe/32/4506_2.png) [@Walter\_Rowe](https://forum.ansible.com/u/Walter_Rowe)\
**Post date:** [October 20, 2023, 11:23am UTC](https://forum.ansible.com/t/what-is-ansible-builtin-file-vs-just-file-module/38536/2 "2023-10-20T11:23:01Z")

</div>

It is now recommended that all modules be called by their FQCN (fully qualified community name).

These ansible.builtin.file and file are the same, but ansible.builtin.file will always guarantee which file module you mean to reference in case some other community package also has a module named file.

Walter

---

<div class="post-metadata">

**Author:** ![Veera](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/veera/32/4107_2.png) [@Veera](https://forum.ansible.com/u/Veera)\
**Post date:** [October 20, 2023, 11:27am UTC](https://forum.ansible.com/t/what-is-ansible-builtin-file-vs-just-file-module/38536/3 "2023-10-20T11:27:30Z")

</div>

In FCQN , “builtin” exists for only ansible’s builtin(native) modules .  
We have other modules too from community or vendors …

[https://docs.ansible.com/ansible/latest/collections/index\_module.html](https://docs.ansible.com/ansible/latest/collections/index_module.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [October 20, 2023, 3:13pm UTC](https://forum.ansible.com/t/what-is-ansible-builtin-file-vs-just-file-module/38536/4 "2023-10-20T15:13:48Z")

</div>

short answer:  
&nbsp;&nbsp;&nbsp;Because collections

long answer:  
&nbsp;&nbsp;Since we added the 'collections' feature we also introduced  
namespaces, including for the modules that existed before collections  
(version 2.9), they CAN still use the 'short name' or 'module name' as  
you called it, even for modules that were moved to collections, will  
still work (as long as the providing collection is installed) with the  
short name. So you DO NOT NEED to update your playbooks to work with  
newer versions of Ansible, it is just what the updated documentation  
and linting tools recommend for new content or when you are updating  
existing plays/roles.

To ensure disambiguation the ansible.builtin and ansible.legacy  
namespaces were created, the 'builtin' will always select the modules  
'shipped' with ansible, while 'legacy' will allow for the overridden  
module of same name. For example `ansible.builtin.ping` will always  
used the shipped copy, while `ansible.legacy.ping` will use that copy  
unless there is another version of the copy module in a play adjacent  
`library/` directory (or in role). Using the 'ping' name will work  
like if using `ansible.legacy.ping` which is the same as 'pre  
collection' behavior.

For modules that used to be in core in \<= 2.9, you can still use the  
short name as we have a 'redirect file' that will go to the collection  
version of the module, ensuring backwards compatibility.

note: what i just wrote for 'modules' applies to all plugin types, it  
is just modules are the most commonly used/thought of.

---

<div class="post-metadata">

**Author:** ![Sameer\_Modak](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sameer_modak/32/5180_2.png) [@Sameer\_Modak](https://forum.ansible.com/u/Sameer_Modak)\
**Post date:** [October 25, 2023, 11:22am UTC](https://forum.ansible.com/t/what-is-ansible-builtin-file-vs-just-file-module/38536/5 "2023-10-25T11:22:23Z")

</div>

Thanks a lot Brian. Your explanation cleared my views.
