--- - name: install_nfs_client_packages ansible.builtin.package: name: "{{ 'nfs-common' if ansible_os_family == 'Debian' else 'nfs-utils' }}" state: present - name: ensure_local_mount_dir_exists ansible.builtin.file: path: "{{ nfs_client_path }}" state: directory mode: '0755' - name: configure_mount_nfs ansible.posix.mount: src: "{{ nfs_server }}:{{ nfs_server_path }}" path: "{{ nfs_client_path }}" fstype: nfs opts: rw,sync,hard,intr state: mounted