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