I am creating a playbook to create a EFS in AWS, using Ansible, but running into errors. Please suggest how to resolve this error.
*Below is my ansible script:* --- - hosts: localhost vars: efs_name: "{{efs_name}}" efs_tagname: "{{efs_tagname}}" efs_purpose: "{{efs_purpose}}" subnet_id: "{{subnet_id}}" security_groups: "{{security_groups}}" tasks: - name: create new EFS instance, named "{{efs_name}}" efs: state: present name: "{{efs_name}}" tags: name: "{{efs_tagname}}" purpose: "{{efs_purpose}}" targets: - subnet_id: "{{subnet_id}}" security_groups: [ "{{security_groups}}" ] *Below is the error:* PLAY [localhost] *************************************************************** 10:12:12 15 16 TASK [Gathering Facts] ********************************************************* 10:12:12 17 task path: /home/centos/Playbooks/create_efs.yml:2 10:12:12 18 Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/setup.py 19 <127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: awx 20 <127.0.0.1> EXEC /bin/bash -c 'sudo -H -S -n -u root /bin/bash -c '"'"'echo BECOME-SUCCESS-vakpgtumskvfocaolgincjmyyehhkfaq; /usr/bin/python2'"'"' && sleep 0' 21 fatal: [localhost]: FAILED! => { 22 "changed": false, 23 "module_stderr": "sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?\n", 24 "module_stdout": "", 25 "msg": "MODULE FAILURE", 26 "rc": 1 27 } 28 29 PLAY RECAP ********************************************************************* 10:12:12 30 localhost : ok=0 changed=0 unreachable=0 failed=1 -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c6bcbcf2-731b-450b-aba6-4a756fb1eb37%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.