salt.modules.mongodb

### Navigation

- index
- modules |
- next |
- previous |
- « SaltStack.org |
- Documentation home
- Full list of builtin execution modules »

# salt.modules.mongodb

Module to provide MongoDB functionality to Salt

This module uses PyMongo, and accepts configuration details as parameters as well as configuration settings:

> mongodb.host: 'localhost' mongodb.port: '27017' mongodb.user: '' mongodb.password: ''

This data can also be passed into pillar. Options passed into opts will overwrite options passed into pillar.

`salt.modules.mongodb.` `db_exists`(name, user=None, password=None, host=None, port=None, database='admin')

  Checks if a database exists in Mongodb

`salt.modules.mongodb.` `db_list`(user=None, password=None, host=None, port=None)

  List all Mongodb databases

`salt.modules.mongodb.` `db_remove`(name, user=None, password=None, host=None, port=None)

  Remove a Mongodb database

`salt.modules.mongodb.` `user_create`(name, passwd, user=None, password=None, host=None, port=None, database='admin')

  Create a Mongodb user

`salt.modules.mongodb.` `user_exists`(name, user=None, password=None, host=None, port=None, database='admin')

  Checks if a user exists in Mongodb

`salt.modules.mongodb.` `user_list`(user=None, password=None, host=None, port=None, database='admin')

  List users of a Mongodb database

`salt.modules.mongodb.` `user_remove`(name, user=None, password=None, host=None, port=None, database='admin')

  Remove a Mongodb user

## Comments

comments powered by Disqus

### Navigation

- index
- modules |
- next |
- previous |
- « SaltStack.org |
- Documentation home
- Full list of builtin execution modules »