0
我已經安裝了最新的puppet代理的ubuntu 14.04。我的用戶'ubuntu'是root和sudo組的一部分。我爲sudo禁用了密碼,並且我無法使puppet清單使用puppetlabs-apache模塊。它抱怨/ var/lib/dpkg/lock文件上的權限被拒絕。我查過的文件甚至都沒有。用sudo運行puppetlabs-apache模塊的木偶代理
這似乎是這樣一個小問題,但即使我運行sudo傀儡它仍然抱怨許可。
我的清單看起來像這樣
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',
}
}
如何啓用,以使用sudo權限運行呢?
,它是在吹起來的部分是(當我使用sudo手動運行它,它不會正常工作)
/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install apache2
,我得到的錯誤是:
Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install apache2' returned 100: 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?
Error: /Stage[main]/Apache/Package[httpd]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install apache2' returned 100: 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?