---


- name: (nfs.yml) Ensure NFS utilities (clients) are installed.
  apt:
    pkg: nfs-common
    state: present
  when: 
    - ansible_os_family == "Debian"
  tags:
    - nfs-client

- name: (nfs.yml) NFS Mount exports from nfs server
  mount:
    path: "{{ item.path }}"
    src: "{{ item.src }}"
    fstype: nfs
    opts: "{{ item.mount_opts }}"
    dump: "{{ item.dump | default(omit) }}"
    passno: "{{ item.passno | default(omit) }}"
    state: mounted
  loop: "{{ nfs_exports }}"
  loop_control:
    label: '{{ item.src }}'
  tags:
    - nfs-client
