small refactoring

This commit is contained in:
Robert Kaussow 2018-07-07 20:00:40 +02:00
parent dd6b2d7dad
commit 2ec10d5d6e
2 changed files with 7 additions and 0 deletions

View File

@ -69,3 +69,9 @@
enabled: yes
become: True
become_user: root
- 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

View File

@ -1,3 +1,4 @@
---
- include_tasks: install.yml
- include_tasks: auth.yml
when: not __mongodb_admin_check == '0'