Centos mongodb puppet模块安装失败

Centos mongodb puppet模块安装失败,centos,puppet,mangodb,Centos,Puppet,Mangodb,我正在尝试安装puppet模块 使用此代码 class {'mongodb::server': port => 27018, verbose => true, auth => true, } class {'mongodb::client':} mongodb::db { 'xxxxx2': user => 'xxxx', password_hash => 'a15fbfca5e3

我正在尝试安装puppet模块

使用此代码

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())
有人遇到这个问题并知道解决方法吗

参考:

auth=>true
更改为
auth=>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

设置为true可为连接的用户启用数据库身份验证 来自远程主机。如果不存在用户,则localhost接口将 继续访问数据库,直到创建第一个 用户。默认值:false