I suspect what would be the right value in this unarchived_list.files[0] to 
input to copy all directories. When I tried another number like 1,2,3 only 
those another directories there are being copied .



On Tuesday, July 20, 2021 at 9:42:49 AM UTC+8 Vincent Nambatac wrote:

>
> Hi there , I want to ask what approach  I will do If I want to copy all 
> content in an unzip files. I unzip the files and list all directories. the 
> problem is I want to copy all files inside the directory but only 1 content 
> being copied. Can somebody how to it. Here is my code.
>
>
>   - name: "Unzip zookeeper package {{ zookeeper_installation_package }} "
>     unarchive:
>       src: "{{ zookeeper_install_package_host_folder }}/{{ 
> zookeeper_installation_package }}"
>       dest: "{{ zookeeper_install_package_host_folder }}"
>       list_files: yes
>       remote_src: yes
>     register: unarchived_list
>
>
>   - name: Removing {{ zookeeper_install_package_host_folder }}/{{ 
> zookeeper_installation_package }}
>     file:
>       path: "{{ zookeeper_install_package_host_folder }}/{{ 
> zookeeper_installation_package }}"
>       state: absent
>
>   - name: Create symbolic link {{ zookeeper_sym_link }} for 
> {{zookeeper_install_package_host_folder}}/{{ unarchived_list.files[0] }}
>     file:
>       src: "{{zookeeper_install_package_host_folder}}/{{ 
> unarchived_list.files[0] }}"
>       dest: "/opt/zookeeper"
>       state: link
>
>
> --- in the Create symbolic link Task I want to copy all content in my 
> unzip file which is zookeeper.tar and make a symbolic link with it using 
> all the content to /opt/zookeeper directory.
>
>
>
> [image: Screenshot from 2021-07-20 09-40-10.png]
>
> In this case , only docs directory being copied . instead all the content .
>
>
> Best regards,
> Vincent
>

-- 
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/1e9184e7-d974-4f21-a4dc-cda25f7d55dfn%40googlegroups.com.

Reply via email to