if you're going to move ALL files in a certain folder to another using Ansible, you would use the command module something like:
command: mv /home/user/boxA/* /var/www/boxB/
But it occurred an stderr saying you cannot move the "/home/user/boxA/*".
I think it should be an easier findable solution .
Thanks.
find: paths: /path/to/files/ # ... the rest of the task register: list1 - name: Find more files you want to move ansible. builtin. find: paths: /different/path/ # ... the rest of the task register: list2 - name: Copy the files ansible.
You should use shell
module instead of command
to use globbing.
shell: mv /home/user/boxA/* /var/www/boxB/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With