mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Fixing mongo user create command.
This commit is contained in:
parent
e2ef0666ba
commit
2876dd1404
1 changed files with 6 additions and 2 deletions
|
@ -241,7 +241,11 @@
|
|||
# Don't use this line below as it means there is already a username and password, so no need to set one
|
||||
# sleep 2; docker exec mongo mongo -u "{{ mongodb_username }}" -p "{{ mongodb_password }}" --eval '
|
||||
cmd: >-
|
||||
sleep 2; docker exec mongo mongo --eval '
|
||||
sleep 2; docker exec mongo mongo admin
|
||||
-u "{{ mongodb_username }}"
|
||||
-p "{{ mongodb_password }}"
|
||||
--authenticationDatabase admin
|
||||
--eval '
|
||||
db.createUser(
|
||||
{
|
||||
user: "{{ mongodb_username }}",
|
||||
|
@ -250,7 +254,7 @@
|
|||
{ role: "root", db: "admin" },
|
||||
]
|
||||
}
|
||||
)' admin
|
||||
)'
|
||||
register: auth_result
|
||||
changed_when:
|
||||
- auth_result.rc == 0
|
||||
|
|
Loading…
Add table
Reference in a new issue