GithubHelp home page GithubHelp logo

isabella232 / ansible-nfs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from embl-ebi-tsi/ansible-nfs

0.0 0.0 0.0 8 KB

Ansible role to configure nfs share and mount points

License: MIT License

ansible-nfs's Introduction

NFS

Configure multiple NFS export and mount points.

The role provides support to both NFS file server and clients. The operating mode is specified by nfs_mode (client is the default).

The role supports multiple exports (in server moded) and mounts (in client mode) via nfs_exports and nfs_mounts lists respectively. Default options for both operating modes are define with variables prefixed nfs_default_ which can be overrided on each export or mount (see defaults/main.yml). Exports on the server are configured using a flexible /etc/exports.d directory. The name of this file is set with nfs_name. Exported directories are exported/mounted read-only by default. Use nfs_export_opts and nfs_mount_opts to change that option and others.

For servers it will configure the exports and firewall. For clients it will add the NFS export to fstab and mount it.

The server is configured to support both NFSv3 and NFSv4 (default). On the client side, one can specify which version to use with nfs_version.

The quota package is also installed on servers and clients, but no configured is done at the moment.

Requirements

See meta/main.yml.

Role Variables

See defaults/main.yml.

Dependencies

None.

Example Playbook

Example:

- hosts: fileserver
  roles:
    - role: nfs
      nfs_exports:
        - name: export1
          clients: '{{groups['fileserver-clients']}}'
          export_dir: /dir/to/export1

- hosts: fileserver-clients
  roles:
    - role: nfs
      nfs_mounts:
        - server: fileserver
          export_dir: /dir/to/export1
          mount_point: /mnt/mount1

TODO

  • Configure quotas.
  • Configure autofs?
  • Export directory permission only works on a single level directory, ie exported directories with subdirs will all get the same permissions, which might be too restrictive.
  • Use nfs_version on server.

Licence

Released under the MIT license.

Author Information

Luis Gracia while at EMBL-EBI:

ansible-nfs's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.