mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #2235 from marktheunissen/mysql-idempotent-explanation
Add mysql user documentation about idempotent playbooks
This commit is contained in:
commit
26826c3bde
1 changed files with 6 additions and 0 deletions
|
@ -81,6 +81,12 @@ notes:
|
||||||
passing credentials. If none are present, the module will attempt to read
|
passing credentials. If none are present, the module will attempt to read
|
||||||
the credentials from C(~/.my.cnf), and finally fall back to using the MySQL
|
the credentials from C(~/.my.cnf), and finally fall back to using the MySQL
|
||||||
default login of 'root' with no password.
|
default login of 'root' with no password.
|
||||||
|
- MySQL server installs with default login_user of 'root' and no password. To secure this user
|
||||||
|
as part of an idempotent playbook, you must create at least two tasks: the first must change the root user's password,
|
||||||
|
without providing any login_user/login_password details. The second must drop a ~/.my.cnf file containing
|
||||||
|
the new root credentials. Subsequent runs of the playbook will then succeed by reading the new credentials from
|
||||||
|
the file.
|
||||||
|
|
||||||
requirements: [ "ConfigParser", "MySQLdb" ]
|
requirements: [ "ConfigParser", "MySQLdb" ]
|
||||||
author: Mark Theunissen
|
author: Mark Theunissen
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in a new issue