without actually looking into it, this does sound very much like a
(missing) trailing slash issue somewhere

On Thu, 7 May 2020 at 11:00, Quentin Aveno <aorio...@gmail.com> wrote:
>
> Hello !
>
> I have an issue concerning modules find then copy (with relpath filter)
>
> I have a role :
> - name: "Test"
>   hosts: localhost
>   vars:
>     archive_name: "/opt/archive.tgz"
>     local_tmp_dir:
>       path: "/tmp/tmp"
>     dest_directory: ""
>   tasks:
>     - name: "[Module] Download and unarchive module"
>       unarchive:
>         remote_src: yes
>         src: "{{ archive_name }}"
>         dest: "{{ local_tmp_dir.path }}"
>
>     - name: "[Module] Recherche de tous les fichiers de la conf"
>       find:
>         paths: "{{ local_tmp_dir.path }}"
>         recurse: yes
>         file_type: any
>       register: local_modules_files
>
>     - name: "[Module] Deploy module in /"
>       copy:
>         src: "{{ item.path }}"
>         dest: "{{ dest_directory }}/{{ item.path | 
> relpath(local_tmp_dir.path) }}"
>       loop_control:
>         label: "{{ item.path }}"
>       loop: "{{ local_modules_files.files }}"
>
>
> When I execute it, all seems to works well, but all the directories are 
> create twice and the files existed in all directories (which means that the 
> fs will be full very quickly)
> If in the tar I had : /etc/services/service1/script1
> It will created :
> - /etc/services/service1/script1 (This one is the good one)
> - /etc/etc/services/service1/script1
> - /etc/services/services/service1/script1
> - /etc/services/service1/service1/script1
>
> Did I miss something ?
>
> --
> 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/d229d89e-9043-45a1-ab63-0680d2b96b42%40googlegroups.com.



-- 
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

-- 
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/CAL8fbwO2hC1su5_g_XYa%3DXRZ%2BkPx8GE76K3f-N6DPcRjGg55BA%40mail.gmail.com.

Reply via email to