Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
databases
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
infra
ansible-shared
databases
Commits
8eb5e00c
Commit
8eb5e00c
authored
2 years ago
by
Thomas Schneider
Browse files
Options
Downloads
Patches
Plain Diff
mysql: Add options to enable binlog
https://mariadb.com/kb/en/binary-log/
parent
1014451f
No related branches found
No related tags found
No related merge requests found
Pipeline
#4381
passed
2 years ago
Stage: test
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
mysql/defaults/main.yml
+1
-0
1 addition, 0 deletions
mysql/defaults/main.yml
mysql/files/override.conf
+2
-0
2 additions, 0 deletions
mysql/files/override.conf
mysql/handlers/main.yml
+10
-0
10 additions, 0 deletions
mysql/handlers/main.yml
mysql/tasks/main.yml
+21
-0
21 additions, 0 deletions
mysql/tasks/main.yml
with
34 additions
and
0 deletions
mysql/defaults/main.yml
+
1
−
0
View file @
8eb5e00c
...
@@ -8,3 +8,4 @@ mysql_backup_user: "backup"
...
@@ -8,3 +8,4 @@ mysql_backup_user: "backup"
mysql_backup_password
:
"
{{
lookup('passwordstore',
'db/{{
ansible_hostname
}}-mysql-backup
create=true
length=20')
}}"
mysql_backup_password
:
"
{{
lookup('passwordstore',
'db/{{
ansible_hostname
}}-mysql-backup
create=true
length=20')
}}"
mysql_rsnapshot
:
false
mysql_rsnapshot
:
false
mysql_enable_binlog
:
false
This diff is collapsed.
Click to expand it.
mysql/files/override.conf
0 → 100644
+
2
−
0
View file @
8eb5e00c
[
Service
]
Environment
=
MYSQLD_OPTS
=--
log
-
bin
This diff is collapsed.
Click to expand it.
mysql/handlers/main.yml
0 → 100644
+
10
−
0
View file @
8eb5e00c
---
-
name
:
Reload systemd
systemd
:
daemon_reload
:
true
-
name
:
Restart mariadb.service
systemd
:
name
:
mariadb.service
state
:
restarted
This diff is collapsed.
Click to expand it.
mysql/tasks/main.yml
+
21
−
0
View file @
8eb5e00c
...
@@ -62,3 +62,24 @@
...
@@ -62,3 +62,24 @@
file
:
file
:
path
:
/etc/cron.d/mysql-snapshot
path
:
/etc/cron.d/mysql-snapshot
state
:
absent
state
:
absent
-
when
:
mysql_enable_binlog
block
:
-
name
:
Create mariadb.service override directory
file
:
path
:
/etc/systemd/system/mariadb.service.d
state
:
directory
owner
:
root
group
:
root
mode
:
'
0755'
-
name
:
Enable binlog
copy
:
src
:
override.conf
dest
:
/etc/systemd/system/mariadb.service.d/override.conf
owner
:
root
group
:
root
mode
:
'
0644'
notify
:
-
Reload systemd
-
Restart mariadb.service
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