我正在尝试安装puppet模块https://forge.puppet.com/puppet/mongodb
使用此代码
class {'mongodb::server':
port => 27018,
verbose => true,
auth => true,
}
class {'mongodb::client':}
mongodb::db { 'xxxxx2':
user => 'xxxx',
password_hash => 'a15fbfca5e3a758be80ceaf42458bcd8',
require => Class['mongodb::server', 'mongodb::client'],
}
我收到这个错误
err Puppet Could not prefetch mongodb_database provider 'mongodb': Could not evaluate MongoDB shell command: rs.slaveOk();printjson(db.getMongo().getDBs())
err Puppet Failed to apply catalog: Could not evaluate MongoDB shell command: rs.slaveOk();printjson(db.getMongo().getDBs())
任何人遇到这个问题,并知道任何修复?
参考:https://github.com/voxpupuli/puppet-mongodb/issues/464
1条答案
按热度按时间e37o9pze1#
将
auth => true
更改为auth => false
可删除错误。验证
设置为true可为从远程主机连接的用户启用数据库验证。如果不存在任何用户,则localhost接口将继续访问数据库,直到您创建第一个用户。默认值:假的