Run as non root user
jaronsampson opened this issue · 1 comments
jaronsampson commented
When I try to use this role on Ubuntu 16.04, I get the following error:
TASK [geerlingguy.ruby : Install packages required to build ruby (Debian).] *************************
failed: [rs-wh-webhead0] (item=[u'build-essential', u'zlib1g-dev', u'libssl-dev', u'libyaml-dev', u'libreadline6-dev', u'zlib1g-dev', u'libncurses5-dev', u'libffi-dev', u'libgdbm3', u'libgdbm-dev']) => {"cache_update_time": 1517631114, "cache_updated": false, "changed": false, "item": ["build-essential", "zlib1g-dev", "libssl-dev", "libyaml-dev", "libreadline6-dev", "zlib1g-dev", "libncurses5-dev", "libffi-dev", "libgdbm3", "libgdbm-dev"], "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\" install 'build-essential' 'zlib1g-dev' 'libssl-dev' 'libyaml-dev' 'libreadline6-dev' 'zlib1g-dev' 'libncurses5-dev' 'libffi-dev' 'libgdbm-dev'' failed: E: 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", "rc": 100, "stderr": "E: 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", "stderr_lines": ["E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)", "E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?"], "stdout": "", "stdout_lines": []}
Is the role written so that it must be run by the root user?
jaronsampson commented
Nevermind - I just added a become to the play