justereseau.nfs_mount
NFS挂载
管理NFS挂载。
角色变量
nfs_version
: 使用的NFS版本(默认: nfs)nfs_mount_opts
: 默认NFS挂载选项(默认: defaults)nfs_share_mounts
: NFS共享的字典列表:path
: 挂载点mount
: NFS服务器路径opts
: 挂载选项(可选)nfs_version
: 使用的NFS版本(可选;默认为 {{ nfs_version }})
示例剧本
- hosts: localhost
roles:
- role: nfs-mount
nfs_share_mounts:
- path: /mnt/remote
location: nfs.example.org:/data
nfs_version: nfs
- path: /mnt/readonly
location: nfs.example.org:/read-only
opts: "{{ nfs_mount_opts }},ro"
nfs_version: nfs4