Hi,
I've open an issue on Github
(https://github.com/ansible/ansible/issues/7157) about mongo_user module.
I'm trying to use mongo_user to create some users. However, I'm unable to
login with the credentials specified.
I use the following commands :
- name: add Mongo admin
mongodb_user: database=admin name=bigadmin password=BigBosS roles='root'
state=present
sudo: true
and then, if I try to connect, it fails :
mongo admin -u bigadmin -p BigBosS
=> auth failed
But if I add this user manually on mongo it works
db.addUser({user: "superadmin", pwd: "BigBosS", roles: [{role:"root",
db:"admin"}]})
mongo admin -u superadmin-p BigBosS
=> auth successfull
The weird thing is that the password is different in the admin
db.system.users collection :
> db.system.users.find()
{ "_id" : "admin.bigadmin", "user" : "bigadmin", "db" : "admin",
"credentials" : { "MONGODB-CR" : "8757ec7d8b6d462f69e10c51d36ff9c1" },
"roles" : [ { "role" : "root", "db" : "admin" } ] }
{ "_id" : "admin.superadmin", "user" : "superadmin", "db" : "admin",
"credentials" : { "MONGODB-CR" : "96dfab41377d3965ce104f7b1f3d8044" },
"roles" : [ { "role" : "root", "db" : "admin" } ] }
I think the password shoud be identical.
Any idea about that ?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/6ccff3ee-9169-447a-a984-969dbce42287%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.