I've been trying to build my Vagrant configuration on Atlas. Also I'm using ansible for provisioning and i have some sudo issues.
After setting up VM while trying to run ansible playbook on Atlas I get this error:
virtualbox-iso: failed: [127.0.0.1] => {"failed": true, "item": ""}
virtualbox-iso: msg: Failed to lock apt for exclusive operation
So I've found on internet that sudo permissions may be the issue. In my main playbook file permissions are set to:
sudo: true
remote_user: vagrant
And the whole thing breakes righ after running playbook, when I need sudo permission, on this cmd in playbook:
-name: Update apt
sudo: yes
apt: update_cache=yes
Does anyone know how to resolve this situation ? How do I fix sudo permissions on ansible ?
NOTE. When I'm trying to build this machine locally it works like a charm but when I run it on Atlas I get the issue.
UPDATE: I believe that sudo access is real issue here I've removed that part of config and it keeps failing on other parts that require sudo.
virtualbox-iso: failed: [127.0.0.1] => (item=curl,wget,python-software- properties) => {"failed": true, "item": "curl,wget,python-software-properties"}
virtualbox-iso: stderr: E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
virtualbox-iso: E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?