ansible/ansible — pull request #6796 by mistaka0s (2014-04-01 13:15:29+00:00)
Title: Remove extra quote from the mysqldump password argument

For complex passwords, the mysqldb Ansible module will fail for database imports or dumps with a '1045: Access Denied' mysql error even though the credentials work properly and the mysqldump command can be run manually.

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''"