j1ngk3.nfs

Ansible Role: NFS

CI

This role installs the NFS (Network File System) server and client.

Requirements

There are no specific requirements.

Role Variables

Here are the variables you can use with this role, along with simple explanations:

# NFS mode: either server or client
nfs_mode: server

# Entry to be added to the /etc/exports file for sharing directories
nfs_exports:
  - path: "/home"
    export: "vnode*.localdomain(fsid=0,rw,async,no_root_squash,no_subtree_check,insecure)"

# Entry to be added to the /etc/fstab file for the NFS client
nfs_client_imports:
  - local: "/home"             # Local path
    remote: "/home"            # Remote path on the server
    server_host: "{{hostvars['server']['ansible_default_ipv4']}}"  # Server's IP address

If you are using NFS client imports, you can also define these extra options:

Dependencies

There are no dependencies.

Example Playbook

Here’s an example of how to set up an NFS server and a client:

    - hosts: server
      roles:
      - { role: 'j1ngk3.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: 'j1ngk3.nfs', nfs_mode: 'client', nfs_client_imports: [{ local: "/home", remote: "/home", server_host: "{{hostvars['server']['ansible_default_ipv4']}}" }] }

License

This project is licensed under the Apache License v2. You can read more about it here.

Informazioni sul progetto

NFS server/client

Installa
ansible-galaxy install j1ngk3.nfs
Licenza
Unknown
Download
250
Proprietario