Hi,
I am trying to use apt module for installing multiple packages on my remote
host. My user is not in sudoers list. However, I do have permissions to run
following commands on remote host
sudo apt-get update
sudo apt-get install top
Now when I am trying to achieve same using ansible playbook, I am getting
following error -
*FAILED! => {"failed": true, "msg": "Missing sudo password"}*
Following is my task definition
- name: install basic packages
apt: name={{item}} update_cache=yes
become: yes
become_method: sudo
with_items:
- tree
- nload
- htop
I have tried removing *become* and *become_method. *Then I am getting
standard dpkg lock error with -vvv flag -
Could not open lock file /var/lib/dpkg/lock - open (13: Permission
denied)\nE: Unable to lock the administration directory (/var/lib/dpkg/),
are you root?\n
What could be potential issue here ?
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/d20a4659-07cc-4069-ac8c-d8eb96c3022e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.