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.
In this case , only docs directory being copied . instead all the content .
Best regards,
Vincent