Mongo auth

This commit is contained in:
Samuel Clay 2021-12-16 20:30:27 -05:00
parent ef62d212ab
commit f36a4f8fd5
2 changed files with 3 additions and 4 deletions

View file

@ -11,8 +11,8 @@
networks:
- name: newsblurnet
env:
MONGODB_URI: 'mongodb://{{ inventory_hostname }}.node.nyc1.consul:27017/admin?'
# MONGODB_URI: 'mongodb://{{ mongodb_username }}:{{ mongodb_password }}@{{ inventory_hostname }}.node.nyc1.consul:27017/admin?authSource=admin'
# MONGODB_URI: 'mongodb://{{ inventory_hostname }}.node.nyc1.consul:27017/admin?'
MONGODB_URI: 'mongodb://{{ mongodb_username }}:{{ mongodb_password }}@{{ inventory_hostname }}.node.nyc1.consul:27017/admin?authSource=admin'
ports:
- '9216:9216'

View file

@ -128,8 +128,7 @@
user: "{{ mongodb_username }}",
pwd: "{{ mongodb_password }}",
roles: [
{ role: "userAdminAnyDatabase", db: "admin" },
{ role: "readWriteAnyDatabase", db: "admin" }
{ role: "root", db: "admin" },
]
}
)' admin