Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
float
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
micah
float
Commits
ffeb7984
Commit
ffeb7984
authored
4 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Add a patch for Ansible 2.7.7 (debian buster) to fix MySQL issues
Short-term mitigation for issue
#79
.
parent
8fd8792f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ansible-buster.patch
+29
-0
29 additions, 0 deletions
ansible-buster.patch
docs/quickstart.md
+5
-0
5 additions, 0 deletions
docs/quickstart.md
with
34 additions
and
0 deletions
ansible-buster.patch
0 → 100644
+
29
−
0
View file @
ffeb7984
Patch for the ansible version in Debian stable (buster) 2.7.7+dfsg-1
that fixes the issues with MySQL user permissions and recent MariaDB
packages.
To apply, run:
sudo patch -p0 -d /usr/lib/python3/dist-packages/ansible < ansible-buster.patch
--- modules/database/mysql/mysql_user.py.orig 2019-02-18 16:21:54.000000000 +0000
+++ modules/database/mysql/mysql_user.py 2020-08-07 23:02:15.152716471 +0100
@@ -427,14 +427,14 @@
return x
for grant in grants:
- res = re.match("GRANT (.+) ON (.+) TO '.*'@'.*'( IDENTIFIED BY PASSWORD '.+')? ?(.*)", grant[0])
+ res = re.match("""GRANT (.+) ON (.+) TO (['`"]).*\\3@(['`"]).*\\4( IDENTIFIED BY PASSWORD (['`"]).+\\6)? ?(.*)""", grant[0])
if res is None:
raise InvalidPrivsError('unable to parse the MySQL grant string: %s' % grant[0])
privileges = res.group(1).split(", ")
privileges = [pick(x) for x in privileges]
- if "WITH GRANT OPTION" in res.group(4):
+ if "WITH GRANT OPTION" in res.group(7):
privileges.append('GRANT')
- if "REQUIRE SSL" in res.group(4):
+ if "REQUIRE SSL" in res.group(7):
privileges.append('REQUIRESSL')
db = res.group(2)
output[db] = privileges
This diff is collapsed.
Click to expand it.
docs/quickstart.md
+
5
−
0
View file @
ffeb7984
...
@@ -23,6 +23,11 @@ one it uses to run Ansible, as in the case of Debian Buster (Python
...
@@ -23,6 +23,11 @@ one it uses to run Ansible, as in the case of Debian Buster (Python
some Python packages that would normally be installed along with
some Python packages that would normally be installed along with
Ansible such as Jinja2 and PyYAML.
Ansible such as Jinja2 and PyYAML.
*NOTE*
: the Ansible version packaged with Debian buster (2.7.7) needs
a patch if your service configuration includes MySQL instances, see
the
`ansible-buster.patch`
file in the top-level directory for
instructions.
The latest Debian stable as of this writing (
*buster*
) no longer
The latest Debian stable as of this writing (
*buster*
) no longer
packages Virtualbox, so you're going to have to
[
download and install
packages Virtualbox, so you're going to have to
[
download and install
it manually
](
https://www.virtualbox.org/wiki/Linux_Downloads
)
. The
it manually
](
https://www.virtualbox.org/wiki/Linux_Downloads
)
. The
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment