geerlingguy/ansible-role-nfs

Cannot run role due to no privileged permission

uyenle5796 opened this issue · 0 comments

  • Issue type: Bug

Issue Description

I'm unable to run the role because I keep getting the error:

"E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)", "E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?"],

Here is my playbook definition:

    - name: "Install NFS"
      include_role:
        name: geerlingguy.nfs
        become: yes
      vars:
        nfs_exports: ["/mnt/efs/vault  *(ro, sync, no_root_squash)"]

I tried moving become: yes to under vars: but it still returns permission denied error. Then I tried moving it to under include_role: like above, but then it says:

ERROR! Invalid options for include_role: become

Can you help me with this please?