Commit Graph

111 Commits (40948cfcc460cff79cccdf10d09a8d93bce28d25)

Author SHA1 Message Date
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
Lee Hardy 1113975741 - mysql: add user_anonymous parameter, which interacts with anonymous users - mysql; add host_all parameter, which forces iteration over all 'user'@... matches 2016-12-08 11:23:51 -05:00
Derek Smith b9baed507b updated examples
added mysql 5.7 user password modification support with backwards compatibility

resolved mysql server version check and differences in user authentication management

explicitly state support for mysql_native_password type and no others. fixed some failing logic and updated samples

updated comment to actually match logic.

simplified conditionals and a little refactor
2016-12-08 11:23:51 -05:00
trevoro b5a3dd4818 adding password_hash support to mysql_user module
fixing user_add arguments error

fixing user_mod arguments error
2016-12-08 11:23:51 -05:00
Mark Theunissen c3450d542f Remove Mark Theunissen as maintainer 2016-12-08 11:23:50 -05:00
Jonathan Mainguy caf6115f43 Update documentation to reflect need for mysql client 2016-12-08 11:23:46 -05:00
wtanaka.com c31a6fd23f Update target parameter documentation
xz support was only added recently (2015-05-15), so referring to it
unqualified in the online documentation is confusing.
2016-12-08 11:23:46 -05:00
Greg DeKoenigsberg 742b452dc1 @lorin stepping down as maintainer 2016-12-08 11:23:45 -05:00
Brian Coca 3906fd426b document mysql collation can only be set during creation 2016-12-08 11:23:44 -05:00
Jonathan Mainguy 833676960d Update doc to reflect password is required if adding a new user 2016-12-08 11:23:44 -05:00
Jonathan Mainguy 346c9ab80e Update error message to be more explicit 2016-12-08 11:23:44 -05:00
Sam Yaple f2c1eeb54c Actually remove the section we are replacing 2016-12-08 11:23:32 -05:00
Sam Yaple 52d364b74c Refix bug 1226 after revert
This patch properly fixes bug 1226 without introducing a breaking
change to idempotency which was introduced in PR #1358

We can properly assign permissions to databases with a '.' in the name
of the database as well as assign priviliges to all databases as
specified with '*'
2016-12-08 11:23:32 -05:00
Sam Yaple f8bcdffa36 Revert "escapeds changes"
While this change doesn't break the creation, it does break
idempotency. This change will convert '*.*' to '`*`.*' which is
functionally the same, however when the user_mod() function looks up
the current privileges with privileges_get() it will read '*.*'

Since '*.*' != '`*`.*' it will go through the process of updating the
privleges always resulting in a 'changed' result.

This reverts commit db9ab9b2629f00350a743a4eca72fb5ee8dc8c77.
2016-12-08 11:23:31 -05:00
Guilherme Carlos aaac05c96c Fix login_user on mysql_user
`login_username` was provided but `login_user` is the correct option
2016-12-08 11:23:24 -05:00
Will Thames e5d96dc934 Correct handling of empty role_attr_flags
role_attr_flags is the empty string by default, not None.
2016-12-08 11:23:24 -05:00
Jesse Sandberg 807feb3ac4 Validate variable, return only the found variable value instead of tuple
Docs imply the mysql_variables is used to operate a single variable therefore
- fail before making any db connections if variable is not set
- validate chars for mysql variable name with re.match(^[a-z0-9_]+)
- use "SHOW VARIABLE WHERE Variable_name" instead of LIKE search
- getvariable() returns only the value or None if variable is not found
- the module returns only the found variable value instead of tuple for easier operation eg. as registere variable in tasks
2016-12-08 11:23:24 -05:00
sysadmin75 9bd58bd224 Fix to revoke privileges for mysql user = '' Issue #9848 2016-12-08 11:23:24 -05:00
acaveroc dda41fd95a Add version_added and type of parameter 2016-12-08 11:23:19 -05:00
acaveroc 2c6f69c95e Assorted minor bug fixes
- Modified data type for port definition from string to integer
- Modified login_host default value for compatibilize with port definition according with MySQL Documentation (https://dev.mysql.com/doc/refman/5.0/en/connecting.html)
2016-12-08 11:23:19 -05:00
acaveroc 1283fdd118 Add port definition support for mysql_vars module 2016-12-08 11:23:19 -05:00
Matt Martz 3d28efaf7e Replace tabbed indentation with spaces for mysql_db module 2016-12-08 11:23:16 -05:00
ToBeReplaced 5e259a8dd9 Make ALL_IN_SCHEMA for tables affect views
ALL TABLES is considered to include views, so we must check for reltypes
'r' and 'v', not just 'r'. This bug was introduced due to using a
custom, backwards-compatible version of "ALL TABLES IN SCHEMA".
2016-12-08 11:23:15 -05:00
Bryan Fleming 6f8d60a5ed fixes #1120 - privileges using columns 2016-12-08 11:23:13 -05:00
Sergei Antipov e62f870859 mysql_user | Hide password 2016-12-08 11:23:08 -05:00
Greg DeKoenigsberg eb881d7d5d Proper author info for all remaining modules 2016-12-08 11:23:07 -05:00
Louis-Michel Couture 03240cfcb6 Update example to remove outdated information 2016-12-08 11:23:05 -05:00
Toshio Kuratomi fa60891f68 Fix a problem introduced with #1101 and optimize privilege handling
* If a db user belonged to a role which had a privilege, the user would
  not have the privilege added as the role gave the appearance that the
  user already had it.  Fixed to always check the privileges specific to
  the user.
* Make fewer db queries to determine if privileges need to be changed
  and change them (was four for each privilege.  Now two for each object
  that has a set of privileges changed).
2016-12-08 11:23:03 -05:00
Toshio Kuratomi 5027fc0642 Expand tildes and vars in the config file path 2016-12-08 11:23:03 -05:00