diff --git a/lib/ansible/modules/extras/database/misc/mongodb_parameter.py b/lib/ansible/modules/extras/database/misc/mongodb_parameter.py index bd8192fe25c..8dafeea179e 100644 --- a/lib/ansible/modules/extras/database/misc/mongodb_parameter.py +++ b/lib/ansible/modules/extras/database/misc/mongodb_parameter.py @@ -92,7 +92,10 @@ author: "Loic Blot (@nerzhul)" EXAMPLES = ''' # Set MongoDB syncdelay to 60 (this is an int) -- mongodb_parameter: param="syncdelay" value=60 param_type="int" +- mongodb_parameter: + param: syncdelay + value: 60 + param_type: int ''' RETURN = ''' diff --git a/lib/ansible/modules/extras/database/misc/mongodb_user.py b/lib/ansible/modules/extras/database/misc/mongodb_user.py index eace7271e11..ca3fcb730dd 100644 --- a/lib/ansible/modules/extras/database/misc/mongodb_user.py +++ b/lib/ansible/modules/extras/database/misc/mongodb_user.py @@ -112,21 +112,54 @@ author: "Elliott Foster (@elliotttf)" EXAMPLES = ''' # Create 'burgers' database user with name 'bob' and password '12345'. -- mongodb_user: database=burgers name=bob password=12345 state=present +- mongodb_user: + database: burgers + name: bob + password: 12345 + state: present # Create a database user via SSL (MongoDB must be compiled with the SSL option and configured properly) -- mongodb_user: database=burgers name=bob password=12345 state=present ssl=True +- mongodb_user: + database: burgers + name: bob + password: 12345 + state: present + ssl: True # Delete 'burgers' database user with name 'bob'. -- mongodb_user: database=burgers name=bob state=absent +- 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 +- 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 # add a user to database in a replica set, the primary server is automatically discovered and written to -- mongodb_user: database=burgers name=bob replica_set=belcher password=12345 roles='readWriteAnyDatabase' state=present +- mongodb_user: + database: burgers + name: bob + replica_set: belcher + password: 12345 + roles: readWriteAnyDatabase + state: present # add a user 'oplog_reader' with read only access to the 'local' database on the replica_set 'belcher'. This is usefull for oplog access (MONGO_OPLOG_URL). # please notice the credentials must be added to the 'admin' database because the 'local' database is not syncronized and can't receive user credentials diff --git a/lib/ansible/modules/extras/database/misc/redis.py b/lib/ansible/modules/extras/database/misc/redis.py index 396a7abe94f..75f08097f7b 100644 --- a/lib/ansible/modules/extras/database/misc/redis.py +++ b/lib/ansible/modules/extras/database/misc/redis.py @@ -103,22 +103,38 @@ author: Xabier Larrakoetxea EXAMPLES = ''' # Set local redis instance to be slave of melee.island on port 6377 -- redis: command=slave master_host=melee.island master_port=6377 +- redis: + command: slave + master_host: melee.island + master_port: 6377 # Deactivate slave mode -- redis: command=slave slave_mode=master +- redis: + command: slave + slave_mode: master # Flush all the redis db -- redis: command=flush flush_mode=all +- redis: + command: flush + flush_mode: all # Flush only one db in a redis instance -- redis: command=flush db=1 flush_mode=db +- redis: + command: flush + db: 1 + flush_mode: db # Configure local redis to have 10000 max clients -- redis: command=config name=maxclients value=10000 +- redis: + command: config + name: maxclients + value: 10000 # Configure local redis to have lua time limit of 100 ms -- redis: command=config name=lua-time-limit value=100 +- redis: + command: config + name: lua-time-limit + value: 100 ''' try: diff --git a/lib/ansible/modules/extras/database/misc/riak.py b/lib/ansible/modules/extras/database/misc/riak.py index ccdec82f0af..bec1ce8928b 100644 --- a/lib/ansible/modules/extras/database/misc/riak.py +++ b/lib/ansible/modules/extras/database/misc/riak.py @@ -88,13 +88,17 @@ options: EXAMPLES = ''' # Join's a Riak node to another node -- riak: command=join target_node=riak@10.1.1.1 +- riak: + command: join + target_node: riak@10.1.1.1 # Wait for handoffs to finish. Use with async and poll. -- riak: wait_for_handoffs=yes +- riak: + wait_for_handoffs: yes # Wait for riak_kv service to startup -- riak: wait_for_service=kv +- riak: + wait_for_service: kv ''' import time