I want to create the following. A relative path in a certain directory. For example in /home/user there is a file called hi.txt, I want to symlink it to bye.txt. With the command line that would then be `cd /home/user; ln -s hi.txt bye.txt` to create a hi.txt -> bye.txt link in /home/user.
But with the Ansible module I always get a full path instead of a relative path in the path working directory. While the docs state "Relative paths are relative to the file being created (path) which is how the Unix command ln -s SRC DEST treats relative paths." In the docs is an example: - name: Create two hard links ansible.builtin.file: src: '/tmp/{{ item.src }}' dest: '{{ item.dest }}' state: hard loop: - { src: x, dest: y } - { src: z, dest: k } However, this creates the symlinks in the root of my home directory rather than in /tmp. And the paths are not relative, they contain the full paths, so not x -> y in /tmp. -- 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-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/37f9d2bc-9269-4053-8fa8-e68e6cb2b4a5n%40googlegroups.com.