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/088038cc-1ce9-4c35-bf67-44aadb2376cen%40googlegroups.com.

Reply via email to