Native YAML - Database/musc (#3603)

pull/18777/head
Fabio Alessandro Locati 8 years ago committed by Matt Clay
parent fb50f129ea
commit 7ac053576e

@ -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 = '''

@ -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

@ -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:

@ -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

Loading…
Cancel
Save