indigo-dc.nfs
NFS Server/Client Role
Set up NFS server/client. This role is made for the INDIGO project.
Role Variables
These variables can be set for this role:
# NFS mode: choose either server or client
nfs_mode: server
# Configuration to add to the /etc/exports file
nfs_exports:
- path: "/home"
export: "vnode*.localdomain(fsid=0,rw,async,no_root_squash,no_subtree_check,insecure)"
# Configuration to add to the /etc/fstab file
nfs_client_imports:
- local: "/home"
remote: "/home"
server_host: "{{hostvars['server']['ansible_default_ipv4']}}"
For NFS client imports, you can also set these additional variables:
state
: More info at: http://docs.ansible.com/ansible/mount_module.htmlopts
: More info at: https://wiki.debian.org/fr/fstabdump
: More info at: https://wiki.debian.org/fr/fstabpassno
: More info at: https://wiki.debian.org/fr/fstab
Example Playbook
Here's an example of how to set up a Torque/PBS cluster:
- 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']}}" }] }
License
This role is licensed under Apache License v2 [1].