From 73ffe683b283b7138cc4f9561d5321211617d8e8 Mon Sep 17 00:00:00 2001 From: Richlv Date: Fri, 4 Jan 2019 05:10:57 +0200 Subject: [PATCH] Update documentation for mysql_db notes (#50444) * Simplify the requirement section to avoid duplicating info already in mysql_document_fragment. * Package installation section simplified, mentioned RHEL; a typo fix in "than". * added dnf for Fedora --- lib/ansible/modules/database/mysql/mysql_db.py | 3 +-- lib/ansible/utils/module_docs_fragments/mysql.py | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ansible/modules/database/mysql/mysql_db.py b/lib/ansible/modules/database/mysql/mysql_db.py index caf8c9f8f19..4f5e79e1971 100644 --- a/lib/ansible/modules/database/mysql/mysql_db.py +++ b/lib/ansible/modules/database/mysql/mysql_db.py @@ -67,8 +67,7 @@ requirements: - mysql (command line binary) - mysqldump (command line binary) notes: - - Requires the PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) package on the remote host, - as well as mysql and mysqldump binaries. + - Requires the mysql and mysqldump binaries on the remote host. - This module is B(not idempotent) when I(state) is C(import), and will import the dump file each time if run more than once. extends_documentation_fragment: mysql ''' diff --git a/lib/ansible/utils/module_docs_fragments/mysql.py b/lib/ansible/utils/module_docs_fragments/mysql.py index 26e879b6d1c..58a9deac95a 100644 --- a/lib/ansible/utils/module_docs_fragments/mysql.py +++ b/lib/ansible/utils/module_docs_fragments/mysql.py @@ -34,7 +34,7 @@ options: default: localhost login_port: description: - - Port of the MySQL server. Requires I(login_host) be defined as other then localhost if login_port is used. + - Port of the MySQL server. Requires I(login_host) be defined as other than localhost if login_port is used. default: 3306 login_unix_socket: description: @@ -66,9 +66,10 @@ requirements: - PyMySQL (Python 2.7 and Python 3.X), or - MySQLdb (Python 2.x) notes: - - Requires the PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) Python package on the remote host. - For Ubuntu, this is as easy as apt-get install python-pymysql. (See M(apt).) For CentOS/Fedora, this - is as easy as yum install python2-PyMySQL. (See M(yum).) + - Requires the PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) package on the remote host. + The Python package may be installed with apt-get install python-pymysql (Ubuntu; see M(apt)) or + yum install python2-PyMySQL (RHEL/CentOS/Fedora; see M(yum)). You can also use dnf install python2-PyMySQL + for newer versions of Fedora; see M(dnf). - Both C(login_password) and C(login_user) are required when you are 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