
    Vh4s                         d dl mZmZmZ eZdZdZdZd dl	Z	d dl
Z
d dlmZ d dlmZ d dlmZmZmZmZmZmZ d d	lmZ g Zd
 ZddZddZddZddZddZddZddZ ddZ!d Z"e#dk(  r e"        yy)    )absolute_importdivisionprint_functionu  
---
module: mysql_replication
short_description: Manage MySQL or MariaDB replication
description:
- Manages MySQL or MariaDB server replication, replica, primary status, get and change primary host.
author:
- Balazs Pocze (@banyek)
- Andrew Klychkov (@Andersson007)
- Dennis Urtubia (@dennisurtubia)
- Laurent Indermühle (@laurent-indermuehle)
options:
  mode:
    description:
    - Module operating mode. Could be
      C(changeprimary) (CHANGE MASTER TO) - also works for MySQL 8.0.23 and later since community.mysql 3.10.0,
      C(changereplication) (CHANGE REPLICATION SOURCE TO) - only supported in MySQL 8.0.23 and later,
      C(getprimary) (SHOW MASTER STATUS),
      C(getreplica) (SHOW REPLICA STATUS),
      C(startreplica) (START REPLICA),
      C(stopreplica) (STOP REPLICA),
      C(resetprimary) (RESET MASTER) - supported since community.mysql 0.1.0,
      C(resetreplica) (RESET REPLICA),
      C(resetreplicaall) (RESET REPLICA ALL).
    type: str
    choices:
    - changeprimary
    - changereplication
    - getprimary
    - getreplica
    - startreplica
    - stopreplica
    - resetprimary
    - resetreplica
    - resetreplicaall
    default: getreplica
  primary_host:
    description:
    - Same as the C(MASTER_HOST) mysql variable.
    type: str
    aliases: [master_host]
  primary_user:
    description:
    - Same as the C(MASTER_USER) mysql variable.
    type: str
    aliases: [master_user]
  primary_password:
    description:
    - Same as the C(MASTER_PASSWORD) mysql variable.
    type: str
    aliases: [master_password]
  primary_port:
    description:
    - Same as the C(MASTER_PORT) mysql variable.
    type: int
    aliases: [master_port]
  primary_connect_retry:
    description:
    - Same as the C(MASTER_CONNECT_RETRY) mysql variable.
    type: int
    aliases: [master_connect_retry]
  primary_log_file:
    description:
    - Same as the C(MASTER_LOG_FILE) mysql variable.
    type: str
    aliases: [master_log_file]
  primary_log_pos:
    description:
    - Same as the C(MASTER_LOG_POS) mysql variable.
    type: int
    aliases: [master_log_pos]
  relay_log_file:
    description:
    - Same as mysql variable.
    type: str
  relay_log_pos:
    description:
    - Same as mysql variable.
    type: int
  primary_ssl:
    description:
    - Same as the C(MASTER_SSL) mysql variable.
    - When setting it to C(yes), the connection attempt only succeeds
      if an encrypted connection can be established.
    - For details, refer to
      L(MySQL encrypted replication documentation,https://dev.mysql.com/doc/refman/8.0/en/replication-solutions-encrypted-connections.html).
    - The default is C(false).
    type: bool
    aliases: [master_ssl]
  primary_ssl_ca:
    description:
    - Same as the C(MASTER_SSL_CA) mysql variable.
    - For details, refer to
      L(MySQL encrypted replication documentation,https://dev.mysql.com/doc/refman/8.0/en/replication-solutions-encrypted-connections.html).
    type: str
    aliases: [master_ssl_ca]
  primary_ssl_capath:
    description:
    - Same as the C(MASTER_SSL_CAPATH) mysql variable.
    - For details, refer to
      L(MySQL encrypted replication documentation,https://dev.mysql.com/doc/refman/8.0/en/replication-solutions-encrypted-connections.html).
    type: str
    aliases: [master_ssl_capath]
  primary_ssl_cert:
    description:
    - Same as the C(MASTER_SSL_CERT) mysql variable.
    - For details, refer to
      L(MySQL encrypted replication documentation,https://dev.mysql.com/doc/refman/8.0/en/replication-solutions-encrypted-connections.html).
    type: str
    aliases: [master_ssl_cert]
  primary_ssl_key:
    description:
    - Same as the C(MASTER_SSL_KEY) mysql variable.
    - For details, refer to
      L(MySQL encrypted replication documentation,https://dev.mysql.com/doc/refman/8.0/en/replication-solutions-encrypted-connections.html).
    type: str
    aliases: [master_ssl_key]
  primary_ssl_cipher:
    description:
    - Same as the C(MASTER_SSL_CIPHER) mysql variable.
    - Specifies a colon-separated list of one or more ciphers permitted by the replica for the replication connection.
    - For details, refer to
      L(MySQL encrypted replication documentation,https://dev.mysql.com/doc/refman/8.0/en/replication-solutions-encrypted-connections.html).
    type: str
    aliases: [master_ssl_cipher]
  primary_ssl_verify_server_cert:
    description:
    - Same as C(MASTER_SSL_VERIFY_SERVER_CERT) MySQL/MariaDB variable.
    - The module switch automatically to C(SOURCE_SSL_VERIFY_SERVER_CERT) for MySQL 8.0.23 and later.
    - Prior to community.mysql 3.14.0 C(false) had no effect.
    type: bool
    version_added: '3.5.0'
  primary_auto_position:
    description:
    - Whether the host uses GTID based replication or not.
    - Same as the C(MASTER_AUTO_POSITION) mysql variable.
    type: bool
    default: false
    aliases: [master_auto_position]
  primary_use_gtid:
    description:
    - Configures the replica to use the MariaDB Global Transaction ID.
    - C(disabled) equals MASTER_USE_GTID=no command.
    - To find information about available values see
      U(https://mariadb.com/kb/en/library/change-master-to/#master_use_gtid).
    - Available since MariaDB 10.0.2.
    choices: [current_pos, replica_pos, disabled]
    type: str
    version_added: '0.1.0'
    aliases: [master_use_gtid]
  primary_delay:
    description:
    - Time lag behind the primary's state (in seconds).
    - Same as the C(MASTER_DELAY) mysql variable.
    - Available from MySQL 5.6.
    - For more information see U(https://dev.mysql.com/doc/refman/8.0/en/replication-delayed.html).
    type: int
    version_added: '0.1.0'
    aliases: [master_delay]
  connection_name:
    description:
    - Name of the primary connection.
    - Supported from MariaDB 10.0.1.
    - Mutually exclusive with I(channel).
    - For more information see U(https://mariadb.com/kb/en/library/multi-source-replication/).
    type: str
    version_added: '0.1.0'
  channel:
    description:
    - Name of replication channel.
    - Multi-source replication is supported from MySQL 5.7.
    - Mutually exclusive with I(connection_name).
    - For more information see U(https://dev.mysql.com/doc/refman/8.0/en/replication-multi-source.html).
    type: str
    version_added: '0.1.0'
  fail_on_error:
    description:
    - Fails on error when calling mysql.
    type: bool
    default: false
    version_added: '0.1.0'

notes:
   - Compatible with MariaDB or MySQL.
   - If an empty value for the parameter of string type is needed, use an empty string.

attributes:
  check_mode:
    support: none

extends_documentation_fragment:
- community.mysql.mysql

seealso:
- module: community.mysql.mysql_info
- name: MySQL replication reference
  description: Complete reference of the MySQL replication documentation.
  link: https://dev.mysql.com/doc/refman/8.0/en/replication.html
- name: MySQL encrypted replication reference.
  description: Setting up MySQL replication to use encrypted connection.
  link: https://dev.mysql.com/doc/refman/8.0/en/replication-solutions-encrypted-connections.html
- name: MariaDB replication reference
  description: Complete reference of the MariaDB replication documentation.
  link: https://mariadb.com/kb/en/library/setting-up-replication/
a  
# If you encounter the "Please explicitly state intended protocol" error,
# use the login_unix_socket argument
- name: Stop mysql replica thread
  community.mysql.mysql_replication:
    mode: stopreplica
    login_unix_socket: /run/mysqld/mysqld.sock

- name: Get primary binlog file name and binlog position
  community.mysql.mysql_replication:
    mode: getprimary

- name: Change primary to primary server 192.0.2.1 and use binary log 'mysql-bin.000009' with position 4578
  community.mysql.mysql_replication:
    mode: changeprimary
    primary_host: 192.0.2.1
    primary_log_file: mysql-bin.000009
    primary_log_pos: 4578

- name: Change replication source to replica server 192.0.2.1 and use binary log 'mysql-bin.000009' with position 4578
  community.mysql.mysql_replication:
    mode: changereplication
    primary_host: 192.0.2.1
    primary_log_file: mysql-bin.000009
    primary_log_pos: 4578

- name: Check replica status using port 3308
  community.mysql.mysql_replication:
    mode: getreplica
    login_host: ansible.example.com
    login_port: 3308

- name: On MariaDB change primary to use GTID current_pos
  community.mysql.mysql_replication:
    mode: changeprimary
    primary_use_gtid: current_pos

- name: Change primary to use replication delay 3600 seconds
  community.mysql.mysql_replication:
    mode: changeprimary
    primary_host: 192.0.2.1
    primary_delay: 3600

- name: Start MariaDB replica with connection name primary-1
  community.mysql.mysql_replication:
    mode: startreplica
    connection_name: primary-1

- name: Stop replication in channel primary-1
  community.mysql.mysql_replication:
    mode: stopreplica
    channel: primary-1

- name: >
    Run RESET MASTER command which will delete all existing binary log files
    and reset the binary log index file on the primary
  community.mysql.mysql_replication:
    mode: resetprimary

- name: Run start replica and fail the task on errors
  community.mysql.mysql_replication:
    mode: startreplica
    connection_name: primary-1
    fail_on_error: true

- name: Change primary and fail on error (like when replica thread is running)
  community.mysql.mysql_replication:
    mode: changeprimary
    fail_on_error: true
z
queries:
  description: List of executed queries which modified DB's state.
  returned: always
  type: list
  sample: ["CHANGE MASTER TO MASTER_HOST='primary2.example.com',MASTER_PORT=3306"]
  version_added: '0.1.0'
N)AnsibleModule)CommandResolver)get_server_versionget_server_implementationmysql_connectmysql_drivermysql_driver_fail_msgmysql_common_argument_spec)	to_nativec                 j    |j                  d      }| j                  |       | j                         }|S )NzSHOW MASTER STATUS)resolve_commandexecutefetchone)cursorcommand_resolverqueryprimarystatuss       u/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/community/mysql/plugins/modules/mysql_replication.pyget_primary_statusr   ?  s1    ,,-ABE
NN5OO%M    c                 ~    |r
d|d|d}nd|z  }|r|d|z  z  }| j                  |       | j                         }|S )NzSHOW  'z' STATUSzSHOW %s STATUS FOR CHANNEL '%s')r   r   )r   connection_namechanneltermr   replica_statuss         r   get_replica_statusr!   G  sJ    )-? 4'$w..
NN5__&Nr   c                 <   |r
d|d|d}nd|z  }|r|d|z  z  }	 t         j                  |       |j                  |       d}|S # t        j                  $ r}d}Y d }~|S d }~wt
        $ r-}|r| j                  dt        |      z  	       d}Y d }~|S d }~ww xY w)
NzSTOP r   'zSTOP %sr   TFzSTOP REPLICA failed: %smsgexecuted_queriesappendr   r   Warning	Exception	fail_jsonr   )	moduler   r   r   fail_on_errorr   r   stoppedes	            r   stop_replicar0   U  s    "&8D $w..	&u N  
 N	  !:Yq\!IJN	#   (A BA""B."BBc                 <   |r
d|d|d}nd|z  }|r|d|z  z  }	 t         j                  |       |j                  |       d}|S # t        j                  $ r}d}Y d }~|S d }~wt
        $ r-}|r| j                  dt        |      z  	       d}Y d }~|S d }~ww xY w)
NRESET r   r#   zRESET %sr   TFzRESET REPLICA failed: %sr$   r&   	r,   r   r   r   r-   r   r   resetr/   s	            r   reset_replicar6   k  s    #'9T!$w..	&u L  
 L	  !;il!JKL	r1   c                 <   |r
d|d|d}nd|z  }|r|d|z  z  }	 t         j                  |       |j                  |       d}|S # t        j                  $ r}d}Y d }~|S d }~wt
        $ r-}|r| j                  dt        |      z  	       d}Y d }~|S d }~ww xY w)
Nr3   r   z' ALLzRESET %s ALLr   TFzRESET REPLICA ALL failed: %sr$   r&   r4   s	            r   reset_replica_allr8     s    '+_=%$w..	&u L  
 L	  !?)A,!NOL	r1   c                 J   |j                  d      }	 t        j                  |       |j                  |       d}|S # t        j
                  $ r}d}Y d }~|S d }~wt        $ r>}|r/| j                  |j                  d      dt        |             d}Y d }~|S d }~ww xY w)NzRESET MASTERTFz	 failed: r$   )	r   r'   r(   r   r   r)   r*   r+   r   )r,   r   r   r-   r   r5   r/   s          r   reset_primaryr:     s    ,,^<E	&u L  
 L	  4D4T4TUc4dfopqfr!stL	s!   (= B"AB"$3BB"c                 <   |r
d|d|d}nd|z  }|r|d|z  z  }	 t         j                  |       |j                  |       d}|S # t        j                  $ r}d}Y d }~|S d }~wt
        $ r-}|r| j                  dt        |      z  	       d}Y d }~|S d }~ww xY w)
NzSTART r   r#   zSTART %sr   TFzSTART REPLICA failed: %sr$   r&   )	r,   r   r   r   r-   r   r   startedr/   s	            r   start_replicar=     s    #'9T!$w..	&u N  
 N	  !;il!JKN	r1   c                     |j                  d      }|r|d|ddj                  |      }n|ddj                  |      }|r|d|z  z  }t        j                  |       | j	                  |       y )NCHANGE MASTERr   z' TO , TO r   )r   joinr'   r(   r   )r   r   chmr   r   
query_headr   s          r   changeprimaryrE     sh    !11/BJ#-N(#((3-8$w..E"
NN5r   c                     ddj                  |      z  }|r|d|z  z  }t        j                  |       | j                  |       y )NzCHANGE REPLICATION SOURCE TO %sr@   r   )rB   r'   r(   r   )r   rC   r   r   s       r   changereplicationrG     sA    -=E$w..E"
NN5r   c                  l   t               } | j                  t        ddg d      t        dddg      t        dd	g
      t        ddg
      t        dddg      t        ddg
      t        ddg
      t        ddg
      t        ddg
      t        d      t        d      t        ddg
      t        ddg
      t        ddg
      t        ddg
      t        dddg      t        ddg
      t        d      t        dg ddg      t        ddg
      t        d      t        d      t        dd              t        | d!d"gg#      }|j                  d$   }|j                  d%   }|j                  d&   }|j                  d'   }|j                  d(   }|j                  d)   }|j                  d*   }|j                  d+   }	|j                  d,   }
|j                  d-   }|j                  d.   }|j                  d/   }|j                  d0   }|j                  d1   }|j                  d2   }|j                  d3   }|j                  d4   }|j                  d5   }|j                  d6   }|j                  d7   }|j                  d8   }|j                  d9   }|j                  d:   }|j                  d;   }|j                  d<   }|j                  j                  d=      d>k(  rd?}n|j                  d=   }|j                  d!   }|j                  d"   }|j                  d@   }t        |j                  t        A       n%t        j                  dBt        j                  C       |j                  dD   }|j                  dE   } 	 t        || |||||d dF||G      \  }!}"t%        !      }$t'        |!      }%t)        |%|$      }&|!j+                  dL       |%dMk(  rdNdOlm}' ndNdOlm}' |'j3                  |!      rdP}(n	dQ}(|dRk(  rdS}|dTk(  rCt5        |!|&      })|)rdU|)v r
dV|)v rd|)dW<   nt        ddXY      }) |j6                  ddZt8        i|) n|dk(  rEt;        |!|||(      })|)rd[|)v sd\|)v rd|)d]<   nt        dd^_      }) |j6                  ddZt8        i|) n|d`k(  r4g }*i }+|&|*j=                  |&j?                  da      db|dc       |&|*j=                  |&j?                  dd      db|dc       |&|*j=                  |&j?                  de      db|dc       |%|*j=                  |&j?                  df      dg|       |%|*j=                  |&j?                  dh      dg|       |&|*j=                  |&j?                  di      db|dc       |	%|*j=                  |&j?                  dj      dg|	       |%|*j=                  |&j?                  dk      dg|       |
|*j=                  dl|
z         ||*j=                  dm|z         |I|r$|*j=                  dn|&j?                  do      z         n#|*j=                  dp|&j?                  do      z         |&|*j=                  |&j?                  dq      db|dc       |&|*j=                  |&j?                  dr      db|dc       |&|*j=                  |&j?                  ds      db|dc       |&|*j=                  |&j?                  dt      db|dc       |&|*j=                  |&j?                  du      db|dc       |I|r$|*j=                  dn|&j?                  dv      z         n#|*j=                  dp|&j?                  dv      z         |r#|*j=                  dn|&j?                  dw      z         ||*j=                  dx|z         	 tA        |!|&|*||       d|+d}<    |j6                  ddZt8        i|+ n|d~k(  rHtC        ||!||||(      },|,du r|j7                  ddt8               nP|j7                  ddt8               n6|dk(  rHtE        ||!||||(      }-|-du r|j7                  ddt8               n|j7                  ddt8               n|dk(  rFtG        ||!|&|      }.|.du r|j7                  ddt8               n|j7                  ddt8               n|dk(  rHtI        ||!||||(      }.|.du r|j7                  ddt8               nk|j7                  ddt8               nQ|dk(  rHtK        ||!||||(      }.|.du r|j7                  ddt8               n|j7                  ddt8               n|dk(  rg }*i }+||*j=                  d|z         ||*j=                  d|z         ||*j=                  d|z         ||*j=                  d|z         ||*j=                  d|z         ||*j=                  d|z         |	|*j=                  d|	z         ||*j=                  d|z         |
|*j=                  dl|
z         ||*j=                  dm|z         |%|r|*j=                  d       n|*j=                  d       ||*j=                  d|z         ||*j=                  d|z         ||*j=                  d|z         ||*j=                  d|z         ||*j=                  d|z         |I|r$|*j=                  dn|&j?                  dv      z         n#|*j=                  dp|&j?                  dv      z         |r|*j=                  d       	 tM        |!|*|       d|+d}<    |j6                  ddZt8        i|+ t        jN                  d       y # t        $ rm}#t        j                  j!                  |      r"|j                  dH|dIt#        |#      A       n!|j                  dJ|dKt#        |#      A       Y d }#~#8d }#~#ww xY w# t        j                  $ r}#t#        |#      |+dy<   Y d }#~#Xd }#~#wt        $ r=}#|j                  t#        |#      dz|&j?                  d{      d||*A       Y d }#~#d }#~#ww xY w# t        j                  $ r}#t#        |#      |+dy<   Y d }#~#Fd }#~#wt        $ r+}#|j                  t#        |#      d|*A       Y d }#~#xd }#~#ww xY w)Nstr
getreplica)	
getprimaryrJ   rE   stopreplicastartreplicaresetprimaryresetreplicaresetreplicaallrG   )typedefaultchoicesboolFmaster_auto_position)rQ   rR   aliasesmaster_host)rQ   rV   master_userTmaster_password)rQ   no_logrV   intmaster_portmaster_connect_retrymaster_log_filemaster_log_pos)rQ   
master_sslmaster_ssl_camaster_ssl_capathmaster_ssl_certmaster_ssl_keymaster_ssl_cipher)current_posreplica_posdisabledmaster_use_gtid)rQ   rS   rV   master_delay)rQ   rR   )modeprimary_auto_positionprimary_hostprimary_userprimary_passwordprimary_portprimary_connect_retryprimary_log_fileprimary_log_posrelay_log_filerelay_log_posprimary_sslprimary_ssl_caprimary_ssl_capathprimary_ssl_certprimary_ssl_keyprimary_ssl_cipherprimary_ssl_verify_server_certprimary_use_gtidprimary_delayr   r   r-   r   r   )argument_specmutually_exclusiverk   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   rl   client_cert
client_keyca_certcheck_hostnameconnect_timeoutconfig_filer~   r}   rh   nor-   r$   error)categorylogin_password
login_user
DictCursor)cursor_classr   r   zRunable to connect to database, check login_user and login_password are correct or z) has the credentials. Exception message: zunable to find z. Exception message: zSELECT VERSION()mariadbr   )replicationREPLICASLAVErg   	slave_posrK   FilePosition
Is_PrimaryzLServer is not configured as mysql primary. Meaning: Binary logs are disabled)r   r%   queriesSlave_IO_RunningReplica_IO_Running
Is_Replicaz)Server is not configured as mysql replica)r   r%   rE   MASTER_HOSTz='r#   MASTER_USERMASTER_PASSWORDMASTER_PORT=MASTER_CONNECT_RETRYMASTER_LOG_FILEMASTER_LOG_POSMASTER_DELAYzRELAY_LOG_FILE='%s'zRELAY_LOG_POS=%sz%s=1
MASTER_SSLz%s=0MASTER_SSL_CAMASTER_SSL_CAPATHMASTER_SSL_CERTMASTER_SSL_KEYMASTER_SSL_CIPHERMASTER_SSL_VERIFY_SERVER_CERTMASTER_AUTO_POSITIONzMASTER_USE_GTID=%swarningz. Query == r?   rA   changedrM   zReplica started )r%   r   r   z.Replica already started (Or cannot be started)rL   zReplica stoppedzReplica already stoppedrN   zPrimary resetzPrimary already resetrO   zReplica resetzReplica already resetrP   rG   zSOURCE_HOST='%s'zSOURCE_USER='%s'zSOURCE_PASSWORD='%s'zSOURCE_PORT=%szSOURCE_CONNECT_RETRY=%szSOURCE_LOG_FILE='%s'zSOURCE_LOG_POS=%szSOURCE_DELAY=%szSOURCE_SSL=1zSOURCE_SSL=0zSOURCE_SSL_CA='%s'zSOURCE_SSL_CAPATH='%s'zSOURCE_SSL_CERT='%s'zSOURCE_SSL_KEY='%s'zSOURCE_SSL_CIPHER='%s'zSOURCE_AUTO_POSITION=1z(. Query == CHANGE REPLICATION SOURCE TO ignore )(r   updatedictr   paramsgetr   r+   r   warningsfilterwarningsr)   r
   r*   ospathexistsr   r   r	   r   r   Pansible_collections.community.mysql.plugins.module_utils.implementations.mariadbr   Nansible_collections.community.mysql.plugins.module_utils.implementations.mysqluses_replica_terminologyr   	exit_jsonr'   r!   r(   r   rE   r=   r0   r:   r6   r8   rG   simplefilter)/r   r,   rk   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   rl   ssl_certssl_keyssl_car   r   r   r~   r}   r   r   r-   r   r   r   db_connr/   server_versionserver_implementationr   implreplica_termstatusrC   resultr<   r.   r5   s/                                                  r   mainr     s   .0Mul 	=! 	" #H^G_`u}o>u}o>5@Q?RSu}o>"8N7OP53D2EF%2B1CD'&f|n=0ABU5H4IJ53D2EF%@P?QRU5H4IJ'+'85 36@Q?RT/?@%(% 6C  "F #	*
F == D==0L==0L}}%78==0L"MM*AB}}%78mm$56O]]#34NMM/2M--.K]]#34N';<}}%78mm$56O';<%+]]3S%T""MM*AB}}]+HmmL)G]]9%F]]#34Nmm$56O--.KMM/2M}}+,
:!==);<mm$56OmmI&GMM/2M23,2F2FG]]#34N|,J
k'
NK(0'64Vb8GXfh (/N5f=&'<nM
NN%&	)xv $$V, },*|#F,<=f&:+?#'F<  89F
 	<!1<V<		#FOWlS "f,$.#'F< U0[\F<!1<V<		 #JJ$4$D$D]$SUabc#JJ$4$D$D]$SUabc'JJ$4$D$DEV$WYijk#JJ"2"B"B="QS_`a ,JJ"2"B"BCY"Z\qrs'JJ$4$D$DEV$WYijk&JJ"2"B"BCS"TVefg$JJ"2"B"B>"RTabc%JJ,~=>$JJ)M9:"

6$4$D$D\$RRS

6$4$D$D\$RRS%JJ$4$D$D_$UWefg)JJ$4$D$DEX$Y[mno'JJ$4$D$DEV$WYijk&JJ$4$D$DEU$VXghi)JJ$4$D$DEX$Y[mno)5-

6$4$D$DEd$eef

6$4$D$DEd$eef JJv 0 @ @AW XXY'JJ+.>>?	C&"2C'R
 !y<!1<V<		-Yefd?!3TK[\!Q[`jz{		vvXded?!2DJZ[!:EScd		ff.>ND=$HXY!8%Qab		ffowWcdD=$HXY!8%Qab	"	"!&&/7M[ghD=$HXY!8%Qab	$	$#JJ)L89#JJ)L89'JJ-0@@A#JJ',67 ,JJ03HHI'JJ-0@@A&JJ*_<=$JJ(=89%JJ,~=>$JJ)M9:"

>*

>*%JJ+n<=)JJ/2DDE'JJ-0@@A&JJ,>?)JJ/2DDE)5-

6$4$D$DEd$eef

6$4$D$DEd$eef JJ/0	gfc73
 !y<!1<V<(#}  k77>>+&<GST"W X {\efg\h!ijkH ## 	- )!F9 	CIaLJZJjJjkzJ{  ~A  "B  C  C	Cb ## 	- )!F9 	gS\]^S_ad!eff	gsa   	m) "o" )q )	o2A"oo"q5p		q2qqr3(q<<r3 r..r3__main__) r   r   )r   r   Fr   )F)r   r   )r   )$
__future__r   r   r   rQ   __metaclass__DOCUMENTATIONEXAMPLESRETURNr   r   ansible.module_utils.basicr   Iansible_collections.community.mysql.plugins.module_utils.command_resolverr   >ansible_collections.community.mysql.plugins.module_utils.mysqlr   r	   r
   r   r   r   ansible.module_utils._textr   r'   r   r!   r0   r6   r8   r:   r=   rE   rG   r   __name__r   r   r   <module>r      s    A @L\EN
 
  4  1 ,,,,V$r zF r   