Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
infra
ansible-shared
databases
Commits
c2f7a183
Commit
c2f7a183
authored
Aug 08, 2019
by
Lars Beckers
Browse files
mysql: move passwordstore lookup from tasks to variables
parent
22448f7b
Changes
2
Show whitespace changes
Inline
Side-by-side
mysql/defaults/main.yml
0 → 100644
View file @
c2f7a183
---
# yamllint disable-line rule:line-length
mysql_root_password
:
"
{{
lookup('passwordstore',
'db/{{
ansible_hostname
}}-mysql
create=true
length=20')
}}"
mysql/tasks/main.yml
View file @
c2f7a183
...
...
@@ -37,11 +37,9 @@
-
name
:
ensure the mysql root user exists and has the correct password
mysql_user
:
name
:
root
# yamllint disable-line rule:line-length
password
:
"
{{
lookup('passwordstore',
'db/{{
ansible_hostname
}}-mysql
create=true
length=20')
}}"
password
:
"
{{
mysql_root_password
}}"
login_user
:
root
# yamllint disable-line rule:line-length
login_password
:
"
{{
lookup('passwordstore',
'db/{{
ansible_hostname
}}-mysql
create=true
length=20')
}}"
login_password
:
"
{{
mysql_root_password
}}"
register
:
mysql_root_creation_result
no_log
:
true
ignore_errors
:
true
...
...
@@ -52,8 +50,7 @@
-
name
:
initialize the mysql root user
mysql_user
:
name
:
root
# yamllint disable-line rule:line-length
password
:
"
{{
lookup('passwordstore',
'db/{{
ansible_hostname
}}-mysql
create=true
length=20')
}}"
password
:
"
{{
mysql_root_password
}}"
no_log
:
true
when
:
mysql_root_creation_result|failed
tags
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment