Typo in hard link example for file module?

[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

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

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

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

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

- Sandip