ubuntu - Running puppet agent for puppetlabs-apache module with sudo -


i've got ubuntu 14.04 latest puppet agent installed. user 'ubuntu' part of root , sudo groups. have password disabled sudo , can't puppet manifest use puppetlabs-apache module. complaining permission denied on /var/lib/dpkg/lock file. checked file isn't there.

this seem such trivial problem, if run sudo puppet still complaining permission.

my manifest looks this

node default {         include apache          apache::vhost { 'st.site.com':                  servername => 'st.site.com',                 port    => '80',                 docroot => '/var/www/html/sources/prod/',                 docroot_owner => 'www-data',                 docroot_group => 'www-data',             }    } 

how can enable run sudo privileges ?

the part blowing on (when run manually sudo work fine)

 /usr/bin/apt-get -q -y -o dpkg::options::=--force-confold install apache2 

the error :

error: execution of '/usr/bin/apt-get -q -y -o dpkg::options::=--force-confold install apache2' returned 100: e: not open lock file /var/lib/dpkg/lock - open (13: permission denied) e: unable lock administration directory (/var/lib/dpkg/), root? error: /stage[main]/apache/package[httpd]/ensure: change purged present failed: execution of '/usr/bin/apt-get -q -y -o dpkg::options::=--force-confold install apache2' returned 100: e: not open lock file /var/lib/dpkg/lock - open (13: permission denied) e: unable lock administration directory (/var/lib/dpkg/), root? 

i think found own answer in documentation. need install agent root or run root. simple that....


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -