John R Barker
1d00dd80f1
Need to quote if there is a :
2016-12-08 11:25:29 -05:00
Sam Doran
6d06f80097
Change examples syntax on postgresql_user module
2016-12-08 11:25:28 -05:00
Sam Doran
13c827a31c
Change examples syntax on postgresql_privs module
2016-12-08 11:25:28 -05:00
Sam Doran
8edd2673b2
> Change examples syntax on postgresql_db module
2016-12-08 11:25:28 -05:00
Sam Doran
e0cfe14901
Change examples syntax on mysql_variables module
2016-12-08 11:25:28 -05:00
Sam Doran
db723af8aa
Change examples syntax on mysql_user module
2016-12-08 11:25:28 -05:00
Sam Doran
119a767cd2
Change examples syntax on mysql_db module
2016-12-08 11:25:28 -05:00
Michael Scherer
5e1dfa9485
Do not leak the password in log ( #5189 )
2016-12-08 11:25:20 -05:00
Michael Scherer
996ccca82f
Do not leak various passwords in log ( #5202 )
2016-12-08 11:25:20 -05:00
John R Barker
25b6492d37
Bulk spelling improvement to modules-core ( #5225 )
...
* Correct spelling mistakes
* Correct more spelling issues
* merge conflict
* Revert typo in parms
2016-12-08 11:25:20 -05:00
Søren Kröger
61144f4da9
Added single_transaction and quick to db_dump ( #3687 )
...
It was missing before, ...
2016-12-08 11:25:12 -05:00
Marius Gedminas
9509224768
postgresql_db: fix inverted 'changed' logic when state=absent ( #4934 )
...
Fixes #4933 .
2016-12-08 11:25:12 -05:00
Tobias Wolf
cda78382b6
Fix database table quoting in privileges_unpack() ( #3858 )
...
In Ansible 2.x this module gives `changed = True` for all privileges
that are specified including a table with
priv: "database.table:GRANT"
Mysql returns escaped names in the format
`database`.`tables`:GRANT
However in PR #1358 , which was intended to support dotted database names
(a crazy idea to begin with), the quotes for the table name were left
out, leading to `curr_priv != new_priv`.
This means that the idempotency comparison between new_priv and
curr_priv is always 'changed'.
This PR re-introduces quoting to the table part of the priv.
2016-12-08 11:24:57 -05:00
Jean Prat
ed246a328f
if user is empty, it is not converted to tuple when using host_all ( #3038 )
2016-12-08 11:24:57 -05:00
Michael Scherer
f59af7d29e
Port postgresql module to python3 ( #4579 )
...
Iteritems is no longer a dict method in Python3, replace it with
the six wrapper.
2016-12-08 11:24:56 -05:00
Michael Scherer
839d5b6de4
Fix mysql_user for python3 ( #4576 )
...
dict no longer have a iteritems method, it was replaced
by items. So we need to use six.
Traceback (most recent call last):
File \"/tmp/ansible_hjd7d65c/ansible_module_mysql_user.py\", line 587, in <module>
main()
File \"/tmp/ansible_hjd7d65c/ansible_module_mysql_user.py\", line 571, in main
changed = user_add(cursor, user, host, host_all, password, encrypted, priv, module.check_mode)
File \"/tmp/ansible_hjd7d65c/ansible_module_mysql_user.py\", line 239, in user_add
for db_table, priv in new_priv.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
2016-12-08 11:24:56 -05:00
René Moser
03022875c4
mysql_db: use new exception handling, fixes build ( #4373 )
2016-12-08 11:24:49 -05:00
Saurabh Sharma
a5695c8b24
error handling for importing non-existent db. Fixes ##2068 ( #3617 )
...
* error handling for importing non-existent db
* creating db on import state and suitable message on deleting db
* handling all possible cases when db exists/not-exists
2016-12-08 11:24:49 -05:00
Michael Scherer
09066f1518
Convert all databases modules to python3 and 2.4 syntax ( #3688 )
2016-12-08 11:24:29 -05:00
Rene Moser
9f1cfe07bb
mysql_user: fix unresolved reference
...
L282, module is used but not passed into function. Replaced check_mode reference and used module instead since check_mode is also in module.
2016-12-08 11:24:26 -05:00
Rene Moser
6a7682c7ea
mysql_variables: fix inconsistent params, fixes ubuntu 16.04 support
...
In the mysql_user module, login_host is defined as "localhost". Setting this to localhost also fixes Ubuntu 16.04 support.
To make it more consistent in the future, the params in all mysql modules should move to module utils. I'll take care.
Also fixed a few other things along.
2016-12-08 11:24:26 -05:00
Jeroen Geusebroek
54e62c2022
Allow an empty password when adding a new MySQL user. ( #3445 )
2016-12-08 11:24:19 -05:00
jjshoe
d3623c8148
Give encoding examples ( #3436 )
2016-12-08 11:24:18 -05:00
hyperized
51e2813ae4
Set --quick to True by default and make it selectable ( #3418 )
...
As indicated by @jmainguy in eb1cb94380 (commitcomment-17077470)
, this will allow the user to set the option quick, which is True by default (as it was before).
This is in reference to: https://github.com/ansible/ansible-modules-core/pull/3402
2016-12-08 11:24:18 -05:00
hyperized
075edf7bb2
Add single_transaction and quick options to MySQL DB module ( #3402 )
2016-12-08 11:24:16 -05:00
Michael Scherer
8b125f8c2c
Mark path as type='path', do not leak login_password by error ( #3396 )
2016-12-08 11:24:16 -05:00
Michael Scherer
c0179330c9
Update the type of some arguments in mysql_db module ( #3285 )
...
login_password should not be logged, so mark it as 'no_log'
the others arguments are path to file, and so should be type='path',
which permit to remove the line handling '~' and shell variables.
2016-12-08 11:24:16 -05:00
Tom Paine
7422ada2c8
Update mysql_db.py
...
* Update mysql_db.py
Resubmission of https://github.com/ansible/ansible-modules-core/pull/2961 in single commit.
* Update mysql_db.py
2016-12-08 11:24:16 -05:00
Matt Clay
b7a5e1e0c8
Add optional connect timeout to mysql* modules.
2016-12-08 11:24:12 -05:00
Kenny Gryp
69b07aaf9d
added sql_log_bin setting to disable binary logging as option
2016-12-08 11:24:11 -05:00
Tobias Wolf
75e8b365b4
Add supports_check_mode=True to mysql_db module
...
The most important cases are state=present and state=absent.
Future work: import and dump could be simulated and hence checked.
2016-12-08 11:24:09 -05:00
Matt Martz
aaf762573e
Various simple linting type cleanups on modules
2016-12-08 11:24:06 -05:00
Toshio Kuratomi
50eda6c62e
password needs to be type str.
...
In 1.9 this was the default. In 2.0.0 and 2.0.1 this doesn't get set.
2.1.0 will fix the default but we should fix this now.
2016-12-08 11:24:05 -05:00
Toshio Kuratomi
f6aa1ff9a4
Remove duplicate documentation fields
2016-12-08 11:24:01 -05:00
Lee H
8e84ba71ae
- fix check_mode test to avoid errors
...
- correct test mode check to ensure it returns and doesnt apply changes
(via jmainguy)
2016-12-08 11:24:00 -05:00
Mark van Driel
a24cdbe15e
Fixed "invalid privileges string: set expected at most 1 arguments, got 2"
2016-12-08 11:23:58 -05:00
Jonathan Mainguy
e9a752f769
add ansi support
2016-12-08 11:23:58 -05:00
Mark van Driel
d67f2eb104
Fixes require ssl in combination with other privileges
...
Fixes require ssl in combination with grant option
Refactoring: code cleanup to make it easier to understand
Code rewritten inspired by @willthames
Added WITH GRANT OPTION as exception; when only REQUIRESSL and/or GRANT are specified we have to add USAGE
2016-12-08 11:23:57 -05:00
KIKUCHI Koichiro
2974358b2b
Add check_mode support to mysql_user.
2016-12-08 11:23:56 -05:00
Jonathan Mainguy
47d0719cfe
Fix bad merge
2016-12-08 11:23:56 -05:00
Josh Rendek
bddcf737c9
Fix quote on grants of more than one word
...
Fixed a quote location on the grants composed of more than one word. Current docs will raise an error with a invalid privilege command.
2016-12-08 11:23:55 -05:00
Toshio Kuratomi
65b9243056
mariadb isn't always the last elemen of the version string
2016-12-08 11:23:53 -05:00
Toshio Kuratomi
0a64899eba
Fix mysqldump usage of config_file
2016-12-08 11:23:53 -05:00
Toshio Kuratomi
dafb39da2e
Account for mariadb versioning
2016-12-08 11:23:53 -05:00
Jonathan Mainguy
0cdb2719e5
Unify all 3 mysql modules.
...
Use same connection method, use config_file, and add ssl support
2016-12-08 11:23:53 -05:00
Lee H
7feb64d31c
- add version_added as requested to host_all
2016-12-08 11:23:53 -05:00
Lee H
5606197c28
- remove user_anonymous as the same thing can be accomplished by user='', but leave in the examples for removing anonymous users
2016-12-08 11:23:53 -05:00
Lee H
95895177d0
- add example showing removal of anonymous user accounts
2016-12-08 11:23:52 -05:00
Jonathan Mainguy
b86224a7ec
Add Jmainguy as author, fix hash check
2016-12-08 11:23:52 -05:00
Lee Hardy
f2f0f83ee6
- fix user_exists statement with host_all to use only username parameter
2016-12-08 11:23:52 -05:00