# Typo in hard link example for file module?

**URL:** <https://forum.ansible.com/t/typo-in-hard-link-example-for-file-module/30981>\
**Category:** Ansible Project\
**Created:** [August 7, 2019, 9:11pm UTC](https://forum.ansible.com/t/typo-in-hard-link-example-for-file-module/30981 "2019-08-07T21:11:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandip\_Bhattacharya](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@Sandip\_Bhattacharya](https://forum.ansible.com/u/Sandip_Bhattacharya)\
**Post date:** [August 7, 2019, 9:11pm UTC](https://forum.ansible.com/t/typo-in-hard-link-example-for-file-module/30981/1 "2019-08-07T21:11:45Z")

</div>

[my third attempt to send this message got lost somehow. Trying again.]

In the documentation for the file module at: [https://docs.ansible.com/ansible/latest/modules/file\_module.html](https://docs.ansible.com/ansible/latest/modules/file_module.html)

An example for creating hard links is given as below:

- name: Create two hard links  
file:  
src: '/tmp/{{ item.src }}'  
dest: '{{ item.dest }}'  
state: link  
with\_items:  
- { src: x, dest: y }  
- { src: z, dest: k }

According to the documentation of the “state” parameter however, the value should be “hard” and not “link". Is this a typo?

Thanks,  
Sandip

---

<div class="post-metadata">

**Author:** ![Andrew\_Latham](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Andrew\_Latham](https://forum.ansible.com/u/Andrew_Latham)\
**Post date:** [August 7, 2019, 11:10pm UTC](https://forum.ansible.com/t/typo-in-hard-link-example-for-file-module/30981/2 "2019-08-07T23:10:12Z")

</div>

Sandip

It appears to be correct in code, maybe a recent fix that just has not resulted in a refreshed docs page. See [https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/files/file.py#L147](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/files/file.py#L147)

---

<div class="post-metadata">

**Author:** ![Sandip\_Bhattacharya](https://avatars.discourse-cdn.com/v4/letter/s/a88e4f/32.png) [@Sandip\_Bhattacharya](https://forum.ansible.com/u/Sandip_Bhattacharya)\
**Post date:** [August 8, 2019, 12:49am UTC](https://forum.ansible.com/t/typo-in-hard-link-example-for-file-module/30981/3 "2019-08-08T00:49:00Z")

</div>

Thanks. Didn't realize the docs are generated from code 🙂

You are right. It seems the bug was reported and fixed last month itself. [https://github.com/ansible/ansible/issues/58451](https://github.com/ansible/ansible/issues/58451)

- Sandip
