small refactoring
This commit is contained in:
parent
dd6b2d7dad
commit
2ec10d5d6e
@ -69,3 +69,9 @@
|
|||||||
enabled: yes
|
enabled: yes
|
||||||
become: True
|
become: True
|
||||||
become_user: root
|
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
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: install.yml
|
- include_tasks: install.yml
|
||||||
- include_tasks: auth.yml
|
- include_tasks: auth.yml
|
||||||
|
when: not __mongodb_admin_check == '0'
|
||||||
|
Loading…
Reference in New Issue
Block a user