Copying files from remote NFS server using chef cookbook

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:

  1. is the directory available to be mounted on your rhel server.
  2. If yes - use the mount resource
    https://docs.chef.io/resource_mount.html of chef
  3. 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.