Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
puppet-modules
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Nbits
Puppet
puppet-modules
Commits
229e4c67
Commit
229e4c67
authored
1 year ago
by
drebs
Browse files
Options
Downloads
Patches
Plain Diff
Default WordPress databases do utf8mb3 charset and collation
parent
d4bcf82c
No related branches found
No related tags found
1 merge request
!38
Draft: Merge branch puppet-7 into master
Pipeline
#180930
failed
1 year ago
Stage: check-code
Stage: tests
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
profile/manifests/mysql/db.pp
+4
-0
4 additions, 0 deletions
profile/manifests/mysql/db.pp
profile/manifests/wordpress/instance.pp
+7
-3
7 additions, 3 deletions
profile/manifests/wordpress/instance.pp
with
11 additions
and
3 deletions
profile/manifests/mysql/db.pp
+
4
−
0
View file @
229e4c67
...
...
@@ -4,6 +4,8 @@ define profile::mysql::db (
String
$pass
=
'password'
,
String
$host
=
$::fqdn
,
Array
[
String
]
$grant
=
[
'ALL'
],
String
$charset
=
'utf8'
,
String
$collate
=
'utf8_general_ci'
,
)
{
mysql::db
{
"
${title}
_
${host}
"
:
...
...
@@ -12,6 +14,8 @@ define profile::mysql::db (
dbname
=>
$title
,
host
=>
$host
,
grant
=>
$grant
,
charset
=>
$charset
,
collate
=>
$collate
,
}
}
This diff is collapsed.
Click to expand it.
profile/manifests/wordpress/instance.pp
+
7
−
3
View file @
229e4c67
...
...
@@ -3,6 +3,8 @@ define profile::wordpress::instance (
String
$db_pass
,
String
$domain
=
$name
,
String
$db_name
=
join
([
'wp_'
,
regsubst
(
$domain
,
/
[
^a
-
z0
-
9_
]
/
,
'_'
,
'G'
)]),
String
$charset
=
'utf8mb3'
,
String
$collate
=
'utf8mb3_general_ci'
,
)
{
if
$domain
!~
/
[
a
-
z0
-
9_.
]
+/
{
fail
(
"Invalid domain:
${domain}
"
)
...
...
@@ -12,6 +14,8 @@ define profile::wordpress::instance (
user
=>
$db_name
,
host
=>
'localhost'
,
pass
=>
$db_pass
,
charset
=>
$charset
,
collate
=>
$collate
,
}
$php_socket
=
"/var/run/php-fpm/
${db_name}
"
...
...
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