softasap.sa_mongo

sa-mongo

构建状态 构建状态

这是一个用于在基于 Ubuntu 的系统上安装 MongoDB 3.2、3.4、3.6、4.0 或 4.2 的角色。

发行版 MongoDB 2.6 MongoDB 3.2 MongoDB 3.4 MongoDB 3.6 MongoDB 4.0 MongoDB 4.2
Ubuntu 14.04 :white_check_mark: :white_check_mark: :white_check_mark: :no_entry: :no_entry: :no_entry:
Ubuntu 16.04 :no_entry: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
Ubuntu 18.04 :no_entry: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark:
  • :white_check_mark: - 可以正常工作
  • :interrobang: - 一段时间内没有生产部署
  • :no_entry: - 不推荐安装

查看 MongoDB 各版本的终止支持情况。通常,您应该选择最新版本或上一版本。 为与使用该角色的旧部署兼容,提供了历史版本。

版本通过 mongo_version 参数控制。

mongo_version: "4.2"  # "2.6" | "3" | "3.2" | "3.4" | "3.6" | "4.0" | "4.2"
mongo_family: "org"   # "org" | "enterprise"

示例:

简单示例

     - {
         role: "sa_mongo",
         mongo_version: "4.2"
       }

高级示例:

     - {
         role: "sa_mongo",
         mongo_version: "4.2",
         mongo_family: "enterprise"
       }

从控制台激活授权

mongo --eval "use admin; db.createUser({user: \"master\", pwd: \"ofthe7keys\",roles: [ { role:\"userAdminAnyDatabase\", db: \"admin\" } ]})"
sudo yq e ".security.authorization = \"enabled\"" -i /etc/mongod.conf
sudo service mongod restart
mongo --port 27017  --authenticationDatabase "admin" -u "master" -p

与 Ansible Galaxy 工作流程的使用

如果您使用以下命令安装了 sa_mongo 角色:

   ansible-galaxy install softasap.sa_mongo

该角色将可在库文件夹 library\softasap.mongo 中找到。请相应调整路径。

     - {
         role: "softasap.sa_mongo"
       }

版权和许可证

代码采用双重许可证,遵循 BSD 3 条款MIT 许可证。选择最适合您的许可证。

联系我们:

关注角色更新可在 FB 订阅。

加入 Gitter 讨论频道 Gitter

http://www.softasap.com/roles/registry_generated.html 发现其他角色。

访问我们的博客 http://www.softasap.com/blog/archive.html。

关于项目

installs MongoDB 3.2, 3.4, 3.6, 4.2 on ubuntu based box

安装
ansible-galaxy install softasap.sa_mongo
许可证
mit
下载
73
拥有者
Get your application deployed in a robust way