xoxys.mongodb/tasks/main.yml
2018-07-10 22:51:02 +02:00

19 lines
495 B
YAML

---
- include_tasks: install.yml
- include_tasks: storage.yml
when: mongodb_lvm_enabled
- include_tasks: confi.yml
- name: Check where admin user already exists
command: |
mongo --quiet -u {{ mongodb_user_admin_name }} -p {{ mongodb_user_admin_password }} --eval 'db.version()' admin
register: __mongodb_admin_check
changed_when: False
failed_when: False
when: mongodb_rbac_enabled
- include_tasks: auth.yml
when: mongodb_rbac_enabled and not __mongodb_admin_check.rc == 0