gpt4 book ai didi

mongodb puppet 模块安装失败

转载 作者:行者123 更新时间:2023-12-04 19:41:29 39 4
gpt4 key购买 nike

我正在尝试安装 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

最佳答案

更改 auth => trueauth => false删除错误。

class {'mongodb::server':
port => 27018,
verbose => true,
auth => false,
}

class {'mongodb::client':}

mongodb::db { 'xxxxx2':
user => 'xxxx',
password_hash => 'a15fbfca5e3a758be80ceaf42458bcd8',
require => Class['mongodb::server', 'mongodb::client'],
}

auth

Set to true to enable database authentication for users connecting from remote hosts. If no users exist, the localhost interface will continue to have access to the database until you create the first user. Default: false

关于mongodb puppet 模块安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60030767/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com