ANSIBLE.MONGODB_USER(3)         ANSIBLE MODULES        ANSIBLE.MONGODB_USER(3)



NAME
       mongodb_user - Adds or removes a user from a MongoDB database.

DESCRIPTION
       Adds or removes a user from a MongoDB database.

OPTIONS
       database
              The name of the database to add/remove the user from(required)

       login_host
              The host running the database (default: localhost)

       login_password
              The password used to authenticate with

       login_port
              The port to connect to (default: 27017)

       login_user
              The username used to authenticate with

       password
              The password to use for the user

       roles  The database user roles valid values are one or more of the
              following: read, 'readWrite', 'dbAdmin', 'userAdmin',
              'clusterAdmin', 'readAnyDatabase', 'readWriteAnyDatabase',
              'userAdminAnyDatabase', 'dbAdminAnyDatabase'This param requires
              mongodb 2.4+ and pymongo 2.5+ (default: readWrite)(Added in
              Ansible version 1.3.)


       state  The database user state Choices: present,absent. (default:
              present)

       user   The name of the user to add or remove(required).

NOTES
       Requires the pymongo Python package on the remote host, version 2.4.2+.
       This can be installed using pip or the OS package manager. @see
       http://api.mongodb.org/python/current/installation.html

EXAMPLES
       # Create 'burgers' database user with name 'bob' and password '12345'.
       - mongodb_user: database=burgers name=bob password=12345 state=present

       # Delete 'burgers' database user with name 'bob'.
       - mongodb_user: database=burgers name=bob state=absent

       # Define more users with various specific roles (if not defined, no roles is assigned, and the user will be added via pre mongo 2.2 style)
       - mongodb_user: database=burgers name=ben password=12345 roles='read' state=present
       - mongodb_user: database=burgers name=jim password=12345 roles='readWrite,dbAdmin,userAdmin' state=present
       - mongodb_user: database=burgers name=joe password=12345 roles='readWriteAnyDatabase' state=present



AUTHOR
       Elliott Foster

SEE ALSO
       ansible(1), http://ansible.github.com/modules.html#mongodb-user



1.4.5                             2014-02-12           ANSIBLE.MONGODB_USER(3)
