Jonathan Mainguy
3da1e5ce62
This fixes 8173, if target was not defined it would break, now it wont
2014-07-18 09:52:37 -04:00
James Cammarata
93d862f3f5
Expand target for mysql_db
...
Fixes #8128
2014-07-16 13:39:47 -05:00
Jonathan Mainguy
2b84ec6b4a
Errors out with stderr 1049, unknown database: when importing a database that does not exist
2014-07-11 14:57:45 -04:00
James Cammarata
a8368e4dc4
Merge pull request #8092 from ghjm/mysql-exceptions
...
Added exception handling to database creation and deletion. Fixes #8075 .
2014-07-11 11:59:12 -05:00
Graham Mainwaring
8e6e9a12e7
Switched primary and alias names of the name/db parameter, to match documentation. Fixes #8065 .
2014-07-10 22:37:46 -04:00
Graham Mainwaring
6e237bed7a
Added exception handling to database creation and deletion. Fixes #8075 .
2014-07-10 22:28:56 -04:00
Jonathan Mainguy
f4690464b4
Makes ansible fail if login_port is defined and login_host is either not defined, or defined as localhost. This is because if login_host is localhost then MySQLdb will use the socket instead of TCP. This leads to confusion for ansible users as, when a port is defined it gets ignored if login_host is localhost. This is to fix the bug reported by wrosario #8070 . Info on MysqlDb can be read here http://mysql-python.sourceforge.net/MySQLdb.html
2014-07-09 14:38:27 -04:00
James Cammarata
ae37758257
Merge pull request #6766 from Jmainguy/mysql_db_bug
...
mysql_db module now correctly fails on import if bz2 or gz fails.
2014-06-23 12:42:42 -05:00
Scott Brown
34d960ef20
BUGFIX 1178: Adding better existence check in one place. db_import now fails fast if target does not exist b/c no point going further without the target.
2014-06-17 14:37:14 -07:00
Scott Brown
1853a3f565
BUGFIX 7811: Adding file existence check when performing mysql import on a .gz or .bz2 file, otherwise Ansible will not notice that the underlying *nix command silently died.
2014-06-17 13:08:53 -07:00
Chao Luan
749e749c11
Remove extra quote from the mysqldump password argument
...
The mysqldb Ansible module will fail if the state specified is import or dump with a '1045: Access Denied' mysql error for complex passwords.
This is caused by the extra quote around the '--password' argument to mysqldump, as pipes.quotes already quotes the password string.
>>> "--password='%s'" % pipes.quote('simple')
"--password='simple'"
>>> "--password='%s'" % pipes.quote('c0mplexp@ssword!')
"--password=''c0mplexp@ssword!''"
>>> "--password='%s'" % pipes.quote('password with space')
"--password=''password with space''"
2014-04-01 23:52:08 +11:00
Jonathan Mainguy
17fa8e3c84
Added mpdehaan suggestion to use os.path.splitext. Wise suggestion, does look clearner
2014-03-31 11:09:00 -04:00
Jonathan Mainguy
f0b2616bd8
mysql_db module now correctly fails on import if bz2 or gz fails.
2014-03-30 13:39:00 -04:00
Richard C Isaacson
122917019c
mysql_db module: typo fix
...
Tests clean.
2014-03-12 23:25:22 -05:00
Richard C Isaacson
d9da5cf084
Shell updates.
2014-03-12 22:15:56 -05:00
Guido Kollerie
314e621671
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.
2014-02-26 12:56:24 +01:00
Jim Kleckner
8ba9019797
Add quotes to password argument for dump/import
...
The password is passed on a command line for dump and import and needs
quoting.
Ideally, this would not be passed on a command line at all - any ideas?
Or at least have a stronger form of quoting so that embedded single
quotes will be escaped.
2014-01-02 12:04:03 -08:00
Jim Kleckner
59396d38e2
Fix mysql_db dump and import to use port argument
...
The code for mysql_db did not pass the port argument when state=dump or
state=import.
2013-12-26 16:21:16 -08:00
James Tanner
4f9aadcc07
Addresses #5023 Fix import comments
2013-12-02 15:13:49 -05:00
James Tanner
38edad70ac
Fixes #5023 Convert all modules to use new snippet import pattern
2013-12-02 15:11:23 -05:00
Michael DeHaan
4c35b7f380
There's a cleaner way to do this, commit to module formatter pending.
...
Revert "No longer need to reference 'version_added' in docs for these, as this was quite a while ago."
This reverts commit ff0a41d446
.
2013-11-27 21:23:03 -05:00
Michael DeHaan
9e4d71203d
No longer need to reference 'version_added' in docs for these, as this was quite a while ago.
2013-11-27 21:19:32 -05:00
James Tanner
f7db64d69b
Merge pull request #4307 from damianmoore/mysql_gzip_bzip2_support
...
Add support for compressing mysql dumps and extracting during import.
2013-11-07 15:07:59 -05:00
James Tanner
3370aee870
Fixes #4720 Use mysql command to restore database instead of mysqldump
2013-10-29 10:33:46 -04:00
James Tanner
f233e29386
mysql_db: if connection is a socket, do not specify hostname
2013-10-16 09:59:31 -04:00
James Tanner
9128862b3b
Fixes #4301 Use module_common functions for mysqldump and return better errors
2013-10-16 09:51:08 -04:00
Damian Moore
85ed9af959
mysql_db now supports import and dump of gzip and bzip2 compressed files
2013-09-30 19:09:32 +01:00
Tom Dymond
b3646176a9
Add option to specify the MySQL server port
2013-09-05 16:25:34 +01:00
Jan-Piet Mens
683e9e27c0
mysql_db small fix to docs
2013-07-14 13:11:03 +02:00
Jan-Piet Mens
3404a0fc16
DOCS: standardize on EXAMPLES (a.k.a. Docs-JumboPatch JetLag Edition)
...
Migrated all examples: in DOCUMENTATION=''' string to standalone EXAMPLES=''' string
Added deprecation warning to moduledev.rst and remove deprecated example from it
Fixed up a few typos and uppercased some acronyms.
add consistency to how EXAMPLES are formatted
2013-06-15 20:54:25 +02:00
Michael DeHaan
cd97a4cb14
Allow modules to be categorized, and also sort them when generating the documentation.
2013-04-28 15:03:45 -04:00