charliemaiors.shinobi_db
Shinobi DB
该角色将部署Mariadb,进行配置,并为Shinobi CCTV创建和填充数据库架构。 支持的操作系统有Ubuntu 18.04/16.04、CentOS 7和Archlinux。
需求
该角色没有任何要求。
角色变量
该角色需要定义四个变量:
user_mail: "[email protected]"
user_pass: "password"
shinobi_pass: "password"
与用户相关的变量(user_mail
和user_pass
)定义了Shinobi前端的真实用户。Shinobi变量(shinobi_pass
)则是后端服务的数据库连接密码。
默认变量如下:
shinobi_user: "shinobi"
dbhash: "md5"
mysql_root: "supersecurerootpassword"
还有一个用于随机密码生成的第三个变量。shinobi_user
变量代表具有CCIO数据库权限的授权用户。dbhash
变量是user_pass
变量在数据库中的哈希算法,以便与Shinobi平台的最新更新兼容,允许的值为:
- md5
- sha256
- sha512
Mariadb的根密码(通过mysql_root
变量定义)是根用户的密码。
所有未定义的密码变量将会随机生成(并在ansible日志中打印)。
示例剧本
这个角色可以只定义用户邮箱,保持默认的哈希算法和所有密码的随机生成。
- hosts: servers
roles:
- { role: shinobi-db, user_mail: "[email protected]" }
或者你可以定义自己的密码并选择合适的哈希算法。
- hosts: servers
roles:
- { role: shinobi-db, user_mail: "[email protected]", user_pass: "test", shinobi_pass: "test", mysql_root: "supersecurerootpassword", dbhash: "sha256" }
许可证
GNU GPL
作者信息
该角色由Carlo Maiorano于2018年创建,作为阿尔玛·马特尔大学计算机科学与工程系的开发人员,指导和监督者为团队负责人Paolo Bellavista。