1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Emphasize target is on remote host. List supported file types.

From the documentation it is not immediately clear that the 'target'
option refers to a location on the remote host. This change emphasizes that.
In addition to .sql files, .bz2 and .gz files are supported for dumps and
restores. This is now documented.
This commit is contained in:
Guido Kollerie 2014-02-26 12:56:24 +01:00
parent 6fa898c511
commit a000f37132

View file

@ -76,7 +76,8 @@ options:
default: null default: null
target: target:
description: description:
- Where to dump/get the C(.sql) file - Location, on the remote host, of the dump file to read from or write to. Uncompressed SQL
files (C(.sql)) as well as bzip2 (C(.bz2)) and gzip (C(.gz)) compressed files are supported.
required: false required: false
notes: notes:
- Requires the MySQLdb Python package on the remote host. For Ubuntu, this - Requires the MySQLdb Python package on the remote host. For Ubuntu, this
@ -92,6 +93,10 @@ author: Mark Theunissen
EXAMPLES = ''' EXAMPLES = '''
# Create a new database with name 'bobdata' # Create a new database with name 'bobdata'
- mysql_db: name=bobdata state=present - mysql_db: name=bobdata state=present
# Copy database dump file to remote host and restore it to database 'my_db'
- copy: src=dump.sql.bz2 dest=/tmp
- mysql_db: name=my_db state=import target=/tmp/dump.sql.bz2
''' '''
import ConfigParser import ConfigParser