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
b2ce138a
Commit
b2ce138a
authored
3 years ago
by
Robin Sonnabend
Browse files
Options
Downloads
Patches
Plain Diff
Only setup backup when rsnapshot is configured, don't use password for root auth
parent
ee8cddd9
No related branches found
No related tags found
No related merge requests found
Pipeline
#3257
passed
3 years ago
Stage: test
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mysql/tasks/main.yml
+34
-49
34 additions, 49 deletions
mysql/tasks/main.yml
with
34 additions
and
49 deletions
mysql/tasks/main.yml
+
34
−
49
View file @
b2ce138a
...
...
@@ -24,30 +24,15 @@
state
:
started
enabled
:
true
-
name
:
ensure the mysql root user exists and has the correct password
mysql_user
:
name
:
root
password
:
"
{{
mysql_root_password
}}"
login_user
:
root
login_password
:
"
{{
mysql_root_password
}}"
register
:
mysql_root_creation_result
no_log
:
true
ignore_errors
:
true
-
name
:
initialize the mysql root user
mysql_user
:
name
:
root
password
:
"
{{
mysql_root_password
}}"
no_log
:
true
when
:
mysql_root_creation_result is failed
-
name
:
setup mysql backups with rsnapshot
when
:
'
"servers_rsnapshot"
in
group_names'
block
:
-
name
:
ensure a read-only mysql user for backups exists
mysql_user
:
name
:
"
{{
mysql_backup_user
}}"
password
:
"
{{
mysql_backup_password
}}"
login_user
:
root
login_password
:
"
{{
mysql_root_password
}}"
priv
:
"
*.*:SELECT,LOCK
TABLES"
no_log
:
true
-
name
:
ensure the backup procedure can access the backup password
template
:
...
...
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