Mount NFS Share
- Mount an NFS export on a Linux machine.
This task mounts an NFS share on a Linux machine. You provide comma-separated
host IP addresses or FQDNs specifying where to mount the share on the hosts.
All the hosts should share the same user name, password, and mount binary location
(for example, /usr/bin/mount if not set in the path on the host machine).
Scenario for Mounting the NFS Share:
- This task creates a new mount directory on the path given by user, mounts the share on the directory, and updates the entry in the /etc/fstab file.
- If the mount directory already exists, the task throws a warning, mounts the share on the directory, and updates the entry in the /etc/fstab file. The rollback is registered only for the /etc/fstab update and will not delete the directory.
- If the mount directory already exists and had an entry in in the /etc/fstab file for the same share name, then the task mounts the share and and throws a warning. The rollback is registered only for unmount and will not delete the directory.
- If the /etc/fstab file is already updated and the mount directory does not exist, the task creates the directory and mounts it. Rollback is registered only for unmounting and deleting the directory.
- If the mount directory already exists and has an entry in the /etc/fstab file for the share name and a mount present on the Linux machine, the task throws a warning and registers for rollback.
- The mount directory already exists and is mounted on some other NFS Share.
- There is an entry in the /etc/fstab for the same mount directory for some other NFS Share.
- The task cannot create the directory, update the entry in /etc/fstab, or mount the NFS share directory.
Input Description Mappable To Type Mandatory Host IP Address(s) Comma Separated IP address(s)/FQDN of the hosts where NFS share need to be mounted. For Example 10.2.2.2,10.3.3.3,bigbox.mynetwork.com gen_text_input Y Username Username gen_text_input Y Password Password password Y NFS Export Path NFS Export Path gen_text_input Y Mount Directory Mount Directory on which NFS Shares to be mounted. The path should start with slash (/) and parent directory for creating mount directory should exist gen_text_input Y FileSystem Type Select NFS FileSystem Type of the Mount Directory NFSFileSystemType Y Optional Parameters Optional parameters to be passed while mounting NFS Share. Please make sure the mount options are valid. gen_text_input Mount Utility Path Mention the complete path of mount binary, ignore if it is already set in the PATH environment variable gen_text_input