Getting started

Default configuration

The role does not specify any NFS shares by default, you need to configure them using the provided variables (see nfs__shares for more details).

The configured NFS shares should exist and be available prior to the role execution, otherwise Ansible will hang waiting for the finished mount command. You can use the debops.nfs_server role to configure NFS4 shares.

Example inventory

To enable NFS support on a host it needs to be included in the specific Ansible inventory group:

[debops_service_nfs]
hostname

Example playbook

If you are using this role without DebOps, here's an example Ansible playbook that uses the debops.nfs role:

---

- name: Manage NFS shares
  hosts: [ 'debops_service_nfs' ]
  become: True

  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'

  roles:

    - role: debops.nfs
      tags: [ 'role::nfs' ]