Mohitsharma44.nfs-client

角色名称

用于挂载 NFS 服务器的 NFS 客户端角色

要求

要测试此设置,您需要一个已导出 /var/nfs/general 的 NFS 服务器,选项如下: /var/nfs/general *(rw,insecure,no_subtree_check,no_root_squash)

角色变量

nfs_shares:包含以下变量的字典列表:

  • mnt_path:本地挂载 NFS 共享的位置
  • remote_path:远程 NFS 共享路径
  • nfs_mount_opts:以逗号分隔的 NFS 挂载选项

依赖关系

nfs-common

该组件由角色安装

示例剧本

- hosts: localhost
  connection: local
  gather_facts: no
  become: yes
  vars:
      nfs_shares:
      - mnt_path: /media/test_export
        remote_path: 10.8.10.67:/var/nfs/general
        nfs_mount_opts: auto,nofail,ro,noatime,nolock,intr,tcp,actimeo=1800

许可证

MIT

作者信息

Mohit Sharma (Mohitsharma44@gmail.com)

关于项目

Ansible role for mounting nfs shares on clients

安装
ansible-galaxy install Mohitsharma44.nfs-client
许可证
mit
下载
598
拥有者
Researcher, Tinkerer and a Developer evangelist