Skip to content

Latest commit

 

History

History
362 lines (327 loc) · 14.5 KB

community.missing_collection.couchdb_db_info_module.rst

File metadata and controls

362 lines (327 loc) · 14.5 KB

community.missing_collection.couchdb_db_info

Get information about Couchdb Database.

Version added: 0.2.0

The below requirements are needed on the host that executes this module.

  • requests
Parameter Choices/Defaults Comments
database
string / required
name of the database.
get_db_explain
boolean
    Choices:
  • no ←
  • yes
do you want to fetch database explain info for database?
get_db_info
boolean
    Choices:
  • no ←
  • yes
do you want to fetch database info for database?
get_db_security
boolean
    Choices:
  • no ←
  • yes
do you want to fetch database security info for database?
get_db_shards
boolean
    Choices:
  • no ←
  • yes
do you want to fetch database shard info for database?
host
string
Default:
"localhost"
hostname/ip of couchdb.
password
string
Default:
"password"
password for couchdb user.
port
string
Default:
"5984"
port number of couchdb.
scheme
string
    Choices:
  • http ←
  • https
http scheme for couchdb.
user
string
Default:
"admin"
couchdb username.

- name: get database info
  community.missing_collection.couchdb_db_info:
    scheme: 'http'
    host: 'localhost'
    port: '5984'
    user: 'admin'
    password: 'password'
    get_db_info: true
    database: "_users"

- name: get database explain info
  community.missing_collection.couchdb_db_info:
    scheme: 'http'
    host: 'localhost'
    port: '5984'
    user: 'admin'
    password: 'password'
    get_db_explain: true
    database: "_users"

- name: get database security info
  community.missing_collection.couchdb_db_info:
    scheme: 'http'
    host: 'localhost'
    port: '5984'
    user: 'admin'
    password: 'password'
    get_db_security: true
    database: "_users"

- name: get database shards info
  community.missing_collection.couchdb_db_info:
    scheme: 'http'
    host: 'localhost'
    port: '5984'
    user: 'admin'
    password: 'password'
    get_db_shards: true
    database: "_users"

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
database
dictionary
when get_db_info is defined and success.
get database info from couchdb.

Sample:
{'cluster': {'n': 3, 'q': 8, 'r': 2, 'w': 2}, 'compact_running': False, 'db_name': 'receipts', 'disk_format_version': 6, 'doc_count': 6146, 'doc_del_count': 64637, 'instance_start_time': '0', 'props': {}, 'purge_seq': 0, 'sizes': {'active': 65031503, 'external': 66982448, 'file': 137433211}, 'update_seq': '292786-g1AAAAF...'}
explain
dictionary
when get_db_explain is defined and success.
get database explain from couchdb.

Sample:
{'dbname': 'movies', 'index': {}, 'selector': {}, 'opts': {}, 'limit': 2, 'skip': 0, 'fields': [], 'range': {}}
security
dictionary
when get_db_security is defined and success.
get members and there permissions in database from couchdb.

Sample:
{'admins': {'names': [], 'roles': []}, 'members': {'names': [], 'roles': []}}
shards
dictionary
when get_db_shards is defined and success.
get shard info of database from couchdb.

Sample:
{'00000000-7fffffff': ['nonode@nohost'], '80000000-ffffffff': ['nonode@nohost']}


Authors