xoxys.mongodb/tasks/main.yml

15 lines
492 B
YAML
Raw Normal View History

2017-07-14 21:05:30 +00:00
---
2018-07-10 20:51:02 +00:00
- include_tasks: install.yml
2018-07-07 21:29:34 +00:00
- include_tasks: storage.yml
when: mongodb_lvm_enabled
2018-07-10 20:54:01 +00:00
- include_tasks: config.yml
2018-07-07 21:20:00 +00:00
- 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
2018-07-08 00:09:26 +00:00
failed_when: False
2018-07-08 13:22:24 +00:00
when: mongodb_rbac_enabled
2018-07-07 16:53:03 +00:00
- include_tasks: auth.yml
2018-07-08 13:22:24 +00:00
when: mongodb_rbac_enabled and not __mongodb_admin_check.rc == 0