disable mongodb rbac by default

This commit is contained in:
Robert Kaussow 2018-07-08 17:25:32 +02:00
parent 10e69c2383
commit 3b74cd9fcf
3 changed files with 3 additions and 20 deletions

View File

@ -12,9 +12,9 @@ mongodb_systemlog_destination: file
mongodb_systemlog_logappend: True mongodb_systemlog_logappend: True
mongodb_systemlog_path: /var/log/mongodb/mongod.log mongodb_systemlog_path: /var/log/mongodb/mongod.log
mongodb_rbac_enabled: True mongodb_rbac_enabled: False
mongodb_user_admin_name: mongoadm # mongodb_user_admin_name: mongoadm
mongodb_user_admin_password: secure # mongodb_user_admin_password: secure
mongodb_lvm_enabled: False mongodb_lvm_enabled: False
# mongodb_lvm_pvs: # mongodb_lvm_pvs:

View File

@ -1,11 +0,0 @@
---
- name: Create databases
mongodb_user:
login_database: admin
login_user: "{{ mongodb_user_admin_name }}"
login_password: "{{ mongodb_user_admin_password }}"
database: unifi
name: unifiadm
password: password
roles: readWrite
state: present

View File

@ -16,9 +16,3 @@
- include_tasks: auth.yml - include_tasks: auth.yml
when: mongodb_rbac_enabled and not __mongodb_admin_check.rc == 0 when: mongodb_rbac_enabled and not __mongodb_admin_check.rc == 0
- include_tasks: add_db_with_auth.yml
when: mongodb_rbac_enabled
- include_tasks: add_db.yml
when: not mongodb_rbac_enabled