From fec19e73d2e9aa37fade2db05e87c37e86f93f89 Mon Sep 17 00:00:00 2001 From: Gabriel PREDA Date: Mon, 5 Sep 2022 12:18:25 +0300 Subject: [PATCH] * add `socket` option suggestion in documentation --- .gitignore | 3 +++ plugins/doc_fragments/mysql.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 6bbe85a..1922df0 100644 --- a/.gitignore +++ b/.gitignore @@ -134,3 +134,6 @@ dmypy.json # MacOS .DS_Store + +# IntelliJ IDEA or PyCharm +.idea/ diff --git a/plugins/doc_fragments/mysql.py b/plugins/doc_fragments/mysql.py index 7d4ec96..1fd3603 100644 --- a/plugins/doc_fragments/mysql.py +++ b/plugins/doc_fragments/mysql.py @@ -81,6 +81,9 @@ requirements: notes: - "To avoid the C(Please explicitly state intended protocol) error, use the I(login_unix_socket) argument, for example, C(login_unix_socket: /run/mysqld/mysqld.sock)." + - Alternatively, to avoid using I(login_unix_socket) argument on each invocation you can specify the socket path + using the `socket` option in your MySQL config file (usually C(~/.my.cnf)) on the destination host, for + example C(socket=/var/lib/mysql/mysql.sock). - Requires the PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) package installed on the remote host. The Python package may be installed with apt-get install python-pymysql (Ubuntu; see M(ansible.builtin.apt)) or yum install python2-PyMySQL (RHEL/CentOS/Fedora; see M(ansible.builtin.yum)). You can also use dnf install python2-PyMySQL