Typo in hard link example for file module?

7 views
Skip to first unread message

Sandip Bhattacharya

unread,
Aug 7, 2019, 5:12:05 PM8/7/19
to ansible...@googlegroups.com
 

[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


Andrew Latham

unread,
Aug 7, 2019, 7:10:32 PM8/7/19
to ansible...@googlegroups.com
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

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/etPan.5d4b3e91.34d78290.38c%40showmethesource.org.


--
- Andrew "lathama" Latham -

Sandip Bhattacharya

unread,
Aug 7, 2019, 8:49:16 PM8/7/19
to Andrew Latham, ansible...@googlegroups.com
On August 7, 2019 at 4:10:31 PM, Andrew Latham (lat...@gmail.com(mailto:lat...@gmail.com)) wrote:
> 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 :)

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

- Sandip
Reply all
Reply to author
Forward
0 new messages