--- # nfs-client tasks - name: /etc/idmapd.conf file tags: - nfs template: > dest=/etc/idmapd.conf group=root mode=0644 owner=root src=idmapd.conf.j2 notify: - restart "nfs-common" - name: install "nfs-common" tags: - nfs - packages apt: > name=nfs-common state=present - name: ensure service "nfs-common" is enabled and started tags: - nfs - services service: > enabled=yes name=nfs-common state=started when: "ansible_distribution_major_version|int < 8"