Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mariadb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
webarch
mariadb
Commits
9b6c3857
Commit
9b6c3857
authored
4 years ago
by
Chris Croome
Browse files
Options
Downloads
Patches
Plain Diff
update variable for setting root auth method
parent
66a7568b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#12630
passed
4 years ago
Stage: check
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
defaults/main.yml
+10
-12
10 additions, 12 deletions
defaults/main.yml
tasks/main.yml
+1
-1
1 addition, 1 deletion
tasks/main.yml
tasks/mariadb_root.yml
+3
-3
3 additions, 3 deletions
tasks/mariadb_root.yml
with
14 additions
and
16 deletions
defaults/main.yml
+
10
−
12
View file @
9b6c3857
...
...
@@ -30,22 +30,20 @@ mariadb_query_cache_size: 0
# Import time zone tables
mariadb_time_zone_import
:
false
# If the mariadb_root_
password
variable is not set then nothing will be done to
#
the
root account login, which, by default, uses a socket for logins and
#
doesn't
have a password set, generally you will want to omit this option --
#
it is
only for cases where non-root users need to login to MariaDB as root
#
that you
need to enable this
# If the mariadb_root_
auth
variable is not set then nothing will be done to
the
# root account login, which, by default, uses a socket for logins and
doesn't
# have a password set, generally you will want to omit this option --
it is
# only for cases where non-root users need to login to MariaDB as root
that you
# need to enable this
.
#
# If the value of mariadb_root_password is "set" and if /root/.my.cnf exists
# then mariadb_root_password will be read from the file, if the file doesn't
# exist then a new password will be generated and the mariadb_root_password
# variable will be set
#
# The mariadb_root_password will be written to the database and /root/.my.cnf
# If the value of mariadb_root_auth is "password" and if /root/.my.cnf exists
# then the MariaDB root password will be read from the file and set, if the
# file doesn't exist then a new password will be generated, set and written to
# that file.
#
# To reverse the setting of a root password set this variable to "socket"
#
# mariadb_root_password
: set
# mariadb_root_
auth:
password
# If the mariadb_username is not set then no user account or database will be
# created
...
...
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
1
−
1
View file @
9b6c3857
...
...
@@ -48,7 +48,7 @@
-
name
:
Conditionally include the root password tasks
include_tasks
:
mariadb_root.yml
when
:
( mariadb_root_
password
is defined ) and ( mariadb_root_
password | length > 0
)
when
:
( mariadb_root_
auth
is defined ) and ( mariadb_root_
auth is regex("^password|socket$")
)
tags
:
-
mariadb
...
...
This diff is collapsed.
Click to expand it.
tasks/mariadb_root.yml
+
3
−
3
View file @
9b6c3857
---
-
name
:
Debug mariadb_root_password
debug
:
var
:
mariadb_root_
password
var
:
mariadb_root_
auth
verbosity
:
1
tags
:
-
mariadb
...
...
@@ -36,13 +36,13 @@
-
name
:
Set the MariaDB root password
include_tasks
:
mariadb_root_password.yml
when
:
( mariadb_root_
password
is defined ) and ( mariadb_root_password
== "set
" )
when
:
( mariadb_root_
auth
is defined ) and ( mariadb_root_
auth == "
password" )
tags
:
-
mariadb
-
name
:
Set the MariaDB root use to use socket authentication
include_tasks
:
mariadb_root_socket.yml
when
:
( mariadb_root_
password
is defined ) and ( mariadb_root_
password
== "socket" )
when
:
( mariadb_root_
auth
is defined ) and ( mariadb_root_
auth
== "socket" )
tags
:
-
mariadb
...
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