--- - name: Install NFS tools yum: name: nfs-utils - name: Mount path file: path: "{{ efs_mount_path }}" state: directory owner: ec2-user group: ec2-user mode: "0755" - name: current AZ check_mode: no uri: url: http://169.254.169.254/latest/meta-data/placement/availability-zone return_content: yes register: aws_current_az - name: Mount EFS volume mount: name: "{{ efs_mount_path }}" src: "{{ efs_id }}.efs.{{ aws_current_az.content[:-1] }}.amazonaws.com:/" fstype: nfs4 opts: "nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,_netdev" passno: 0 dump: 0 state: mounted