Commit 337ad154 by ansible

no message

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