Can you help me to get an example for copying files from remote UNIX NFS server to the local RHEL machine using chef resource. I understand we can use remote_file resource for this purpose but i couldn’t able to find the valid syntax of this command for copying the file from NFS server. Can you help on the same.
Have not done it before but i would first look into:
- is the directory available to be mounted on your rhel server.
- If yes - use the mount resource
https://docs.chef.io/resource_mount.html of chef - Copy the file . Then, decide if you want to umount it or leave it
mounted.
The best luck I’ve ever had with NFS is using this.
I ended up writing this recipe to do what i was trying to do. Hopefully it’ll give you some help.