1# -*- coding: utf-8 -*-
2
3# Copyright: (c) 2015, Jonathan Mainguy <jon@soh.re>
4# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5
6
7class ModuleDocFragment(object):
8
9    # Standard mysql documentation fragment
10    DOCUMENTATION = r'''
11options:
12  login_user:
13    description:
14      - The username used to authenticate with.
15    type: str
16  login_password:
17    description:
18      - The password used to authenticate with.
19    type: str
20  login_host:
21    description:
22      - Host running the database.
23    type: str
24    default: localhost
25  login_port:
26    description:
27      - Port of the MySQL server. Requires I(login_host) be defined as other than localhost if login_port is used.
28    type: int
29    default: 3306
30  login_unix_socket:
31    description:
32      - The path to a Unix domain socket for local connections.
33    type: str
34  connect_timeout:
35    description:
36      - The connection timeout when connecting to the MySQL server.
37    type: int
38    default: 30
39    version_added: "2.1"
40  config_file:
41    description:
42      - Specify a config file from which user and password are to be read.
43    type: path
44    default: '~/.my.cnf'
45    version_added: "2.0"
46  ca_cert:
47    description:
48      - The path to a Certificate Authority (CA) certificate. This option, if used, must specify the same certificate
49        as used by the server.
50    type: path
51    version_added: "2.0"
52    aliases: [ ssl_ca ]
53  client_cert:
54    description:
55      - The path to a client public key certificate.
56    type: path
57    version_added: "2.0"
58    aliases: [ ssl_cert ]
59  client_key:
60    description:
61      - The path to the client private key.
62    type: path
63    version_added: "2.0"
64    aliases: [ ssl_key ]
65requirements:
66   - PyMySQL (Python 2.7 and Python 3.X), or
67   - MySQLdb (Python 2.x)
68notes:
69   - Requires the PyMySQL (Python 2.7 and Python 3.X) or MySQL-python (Python 2.X) package on the remote host.
70     The Python package may be installed with apt-get install python-pymysql (Ubuntu; see M(apt)) or
71     yum install python2-PyMySQL (RHEL/CentOS/Fedora; see M(yum)). You can also use dnf install python2-PyMySQL
72     for newer versions of Fedora; see M(dnf).
73   - Both C(login_password) and C(login_user) are required when you are
74     passing credentials. If none are present, the module will attempt to read
75     the credentials from C(~/.my.cnf), and finally fall back to using the MySQL
76     default login of 'root' with no password.
77'''
78