--- - name: setup nfs-client hosts: docker_swarm become_method: sudo become_user: root become: yes tasks: - name: install nfs-client apt: update_cache: yes pkg: - nfs-common - name: update rpc config copy: src: rpc-statd.service dest: /lib/systemd/system/rpc-statd.service - name: stop and disable rpc systemd: name: rpc-statd state: stopped enabled: false - name: start and enable rpc systemd: name: rpc-statd state: started enabled: true