I'm trying to create some symbolic links with a specific owner/group, but it's always created with owner=root and group=root. Why?
This is my code:
- name: Get the directories to create symbolic links
find:
paths: /myPath/
register: result
- name: Creation of symbolic links
file:
src: "{{ item.path }}"
dest: /Path_Dest/{{ item.path | basename }}
owner: 'owner1'
group: 'group1'
state: link
with_items: "{{ result.files }}"
Note :
- owner1 and group1 exist.
- No error in Ansible log