Rohit Rai:
Hello All, I’m trying to copy a file from dir to another directory ( same remote host ), Copy & Template modules are giving me Source file not found, Fetch module if giving me error “ Unable to create local directories “ , can some suggest me a module which copies the file on the same host between different directories
Rohit Rai:
Trying to avoid shell commands
Rohit Rai:
I’m copying few system config files as a backup,
when I use Copy or Template builtins module even with remote_src: yes , I’m getting File not found error ( seems checking for files on ansible controller )
when I use Fetch builtin, I’m getting Unable to create local directories ( Playbook is trying to create directories on Ansible controller node )
Chris:
Are the local directories created? Or do you need to create them. ie if you were to change the dest_location: /tmp/
Rohit Rai:
So I don’t need to copy files from remote server to local … I need to copy file on the same remote server
Rohit Rai:
So this project is for prepping the host for patching
Rohit Rai:
Let’s say host is http://host.example.com|host.example.com, I want to copy udev config file of http://host.example.com|host.example.com in the host itself in a different directory
Chris:
I understand. My question is, on the remote server, does the location exist?
Chris:
This location: “/u/spool/30/crash/patch data/”
Rohit Rai:
Yes the location exists
Rohit Rai:
I’m creating destination in a separate task, also I’m able to copy a shell command o/p in one of the file in that dir
Chris:
Cool. I’ll repro in my lab on Sunday or Monday