Commit 337ad154 by ansible

no message

1 parent 979e1ad9
Showing with 8 additions and 20 deletions
......@@ -2,23 +2,10 @@
- hosts: wdchat-dma
become: true
tasks:
- mongodb_user:
login_user: root
login_password: password
login_database: admin
login_port: 7017
database: admin
name: wdobject
password: BBKaQWZpX43qN2Rn
roles: userAdminAnyDatabase
state: present
- mongodb_user:
login_user: wdobject
login_password: BBKaQWZpX43qN2Rn
login_port: 7017
login_database: admin
database: WDCHAT
name: wdmongo
password: BBgYWpbfqkr5ZwTS
roles: dbAdmin,readWrite
- name: Create Database WDCHAT & WDAUTHEN & USER
expect:
command: /opt/stack/mongodb/mongodb/bin/mongo --host 127.0.0.1 --port 7018
responses:
'>': 'use admin'
'switched to db admin': 'db.auth("root", "password")'
'1': 'db.createUser({user: "test",pwd: "test",roles: [ { role: "userAdminAnyDatabase", db: "admin" }]})
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!