Commit Graph

30 Commits (68e59332c7fd65e11a410f7cc87fa89995968c6f)

Author SHA1 Message Date
James Cammarata ac73822405 Expand target for mysql_db
Fixes #8128
10 years ago
Jonathan Mainguy 40ef07a286 Errors out with stderr 1049, unknown database: when importing a database that does not exist 10 years ago
James Cammarata 5e0d07c93e Merge pull request #8092 from ghjm/mysql-exceptions
Added exception handling to database creation and deletion. Fixes #8075.
10 years ago
Graham Mainwaring 22390e50e5 Switched primary and alias names of the name/db parameter, to match documentation. Fixes #8065. 10 years ago
Graham Mainwaring 980d9da7e9 Added exception handling to database creation and deletion. Fixes #8075. 10 years ago
Jonathan Mainguy 90f7f82224 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 10 years ago
James Cammarata 5ad7dcf4f0 Merge pull request #6766 from Jmainguy/mysql_db_bug
mysql_db module now correctly fails on import if bz2 or gz fails.
11 years ago
Scott Brown 28c9104ed5 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. 11 years ago
Scott Brown b09a144724 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. 11 years ago
Chao Luan 134c449cf6 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''"
11 years ago
Jonathan Mainguy 8928a5ede1 Added mpdehaan suggestion to use os.path.splitext. Wise suggestion, does look clearner 11 years ago
Jonathan Mainguy bb73819c43 mysql_db module now correctly fails on import if bz2 or gz fails. 11 years ago
Richard C Isaacson 2b53ece3ab mysql_db module: typo fix
Tests clean.
11 years ago
Richard C Isaacson 427221786c Shell updates. 11 years ago
Guido Kollerie a000f37132 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.
11 years ago
Jim Kleckner dacef1915a 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.
11 years ago
Jim Kleckner f532b449d7 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.
11 years ago
James Tanner ad837709bd Addresses #5023 Fix import comments 11 years ago
James Tanner 6000d636b3 Fixes #5023 Convert all modules to use new snippet import pattern 11 years ago
Michael DeHaan 36effd237c 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.
11 years ago
Michael DeHaan ff0a41d446 No longer need to reference 'version_added' in docs for these, as this was quite a while ago. 11 years ago
James Tanner 6cdc99286c Merge pull request #4307 from damianmoore/mysql_gzip_bzip2_support
Add support for compressing mysql dumps and extracting during import.
11 years ago
James Tanner d3c8832414 Fixes #4720 Use mysql command to restore database instead of mysqldump 11 years ago
James Tanner 807e602228 mysql_db: if connection is a socket, do not specify hostname 11 years ago
James Tanner 84a692bcf7 Fixes #4301 Use module_common functions for mysqldump and return better errors 11 years ago
Damian Moore 3c57168aaa mysql_db now supports import and dump of gzip and bzip2 compressed files 11 years ago
Tom Dymond 11c2378259 Add option to specify the MySQL server port 11 years ago
Jan-Piet Mens c4189dfd3c mysql_db small fix to docs 11 years ago
Jan-Piet Mens 5c69918d53 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
12 years ago
Michael DeHaan 391fb98ee2 Allow modules to be categorized, and also sort them when generating the documentation. 12 years ago