indigo-dc.nfs
NFS服务器/客户端角色
安装NFS服务器/客户端。此角色专为INDIGO项目而开发。
角色变量
可以传递给此角色的变量及其简要说明如下。
# NFS安装模式:服务器或客户端
nfs_mode: server
# 添加到/etc/exports文件的行
nfs_exports:
- path: "/home"
export: "vnode*.localdomain(fsid=0,rw,async,no_root_squash,no_subtree_check,insecure)"
# 添加到/etc/fstab文件的行
nfs_client_imports:
- local: "/home"
remote: "/home"
server_host: "{{hostvars['server']['ansible_default_ipv4']}}"
NFS客户端导入还可以定义以下变量:
state
:更多信息请见:http://docs.ansible.com/ansible/mount_module.htmlopts
:更多信息请见:https://wiki.debian.org/fr/fstabdump
:更多信息请见:https://wiki.debian.org/fr/fstabpassno
:更多信息请见:https://wiki.debian.org/fr/fstab
示例剧本
这是如何安装Torque/PBS集群的示例:
- hosts: server
roles:
- { role: 'indigo-dc.nfs', nfs_mode: 'server', nfs_exports: [{path: "/home", export: "vnode*.localdomain(fsid=0,rw,async,no_root_squash,no_subtree_check,insecure)"}] }
- hosts: client
roles:
- { role: 'indigo-dc.nfs', nfs_mode: 'client', nfs_client_imports: [{ local: "/home", remote: "/home", server_host: "{{hostvars['server']['ansible_default_ipv4']}}" }] }
许可证
Apache许可证 v2 [1]