---
# efivars is chattr +i since linux 4.5
- name: Ensure efivars are not mounted ro in fstab
  become: yes
  lineinfile:
    path: /etc/fstab
    state: absent
    regexp: '^efivars'
  tags:
    - mounts

- name: Ensure nfs support is installed
  become: yes
  pacman:
    name: nfs-utils
    state: latest
  tags:
    - mounts
  when:
    - has_nfs_mount is defined and has_nfs_mount

- name: Ensure NFS share is mounted
  become: yes
  mount:
    name: /shared
    src: spookcentral.{{ network.local_domain }}:/shared
    fstype: nfs4
    opts: _netdev,noatime,noauto,retrans=5,rsize=32768,soft,timeo=14,timeo=900,wsize=32768,x-systemd.automount,x-systemd.idle-timeout=1min,x-systemd.mount-timeout=10
    state: present
  tags:
    - mounts
  when:
    - has_nfs_mount is defined and has_nfs_mount

---
# efivars is chattr +i since linux 4.5
- name: Ensure efivars are not mounted ro in fstab
  become: yes
  lineinfile:
    path: /etc/fstab
    state: absent
    regexp: '^efivars'
  tags:
    - mounts

- name: Ensure nfs support is installed
  become: yes
  pacman:
    name: nfs-utils
    state: latest
  tags:
    - mounts
  when:
    - has_nfs_mount is defined and has_nfs_mount
    - ansible_facts.distribution != "Debian"

- name: Ensure NFS share is mounted
  become: yes
  mount:
    name: /shared
    src: spookcentral.{{ network.local_domain }}:/shared
    fstype: nfs4
    opts: _netdev,noatime,noauto,retrans=5,rsize=32768,soft,timeo=14,timeo=900,wsize=32768,x-systemd.automount,x-systemd.idle-timeout=1min,x-systemd.mount-timeout=10
    state: present
  tags:
    - mounts
  when:
    - has_nfs_mount is defined and has_nfs_mount

Fix mount role on debian
Fix mount role on debian
