mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-09-30 05:23:25 -07:00
Fix CI (#733)
Some checks are pending
Plugins CI / Sanity (Ⓐdevel) (push) Waiting to run
Plugins CI / Sanity (Ⓐstable-2.17) (push) Waiting to run
Plugins CI / Sanity (Ⓐstable-2.18) (push) Waiting to run
Plugins CI / Sanity (Ⓐstable-2.19) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: mysqlclient 2.0.1) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mysql 8.4.1, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.16, DB: mariadb 10.11.8, connector: pymysql 0.10.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: mysqlclient 2.0.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mysql 8.4.1, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: mysqlclient 2.0.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: mysqlclient 2.0.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 10.11.8, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 10.11.8, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.4.1, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: mysqlclient 2.0.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: mysqlclient 2.0.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 10.11.8, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 10.11.8, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.4.1, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Units (Ⓐdevel, Python3.10) (push) Waiting to run
Plugins CI / Units (Ⓐdevel, Python3.11) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.10) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.11) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.8) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.9) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.19, Python3.10) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.19, Python3.11) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.19, Python3.9) (push) Waiting to run
Some checks are pending
Plugins CI / Sanity (Ⓐdevel) (push) Waiting to run
Plugins CI / Sanity (Ⓐstable-2.17) (push) Waiting to run
Plugins CI / Sanity (Ⓐstable-2.18) (push) Waiting to run
Plugins CI / Sanity (Ⓐstable-2.19) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: mysqlclient 2.0.1) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mysql 8.4.1, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐdevel, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.16, DB: mariadb 10.11.8, connector: pymysql 0.10.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: mysqlclient 2.0.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mysql 8.4.1, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.17, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: mysqlclient 2.0.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: mysqlclient 2.0.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 10.11.8, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 10.11.8, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.4.1, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: mysqlclient 2.0.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: mysqlclient 2.0.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 10.11.8, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: mysqlclient 2.0.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 10.11.8, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.4.1, connector: mysqlclient 2.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: pymysql 0.9.3) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: pymysql 1.0.2) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.4.5, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Waiting to run
Plugins CI / Units (Ⓐdevel, Python3.10) (push) Waiting to run
Plugins CI / Units (Ⓐdevel, Python3.11) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.10) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.11) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.8) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.18, Python3.9) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.19, Python3.10) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.19, Python3.11) (push) Waiting to run
Plugins CI / Units (Ⓐstable-2.19, Python3.9) (push) Waiting to run
This commit is contained in:
parent
08257cd4d4
commit
96828579ac
3 changed files with 12 additions and 16 deletions
|
@ -15,8 +15,6 @@ import string
|
|||
import json
|
||||
import re
|
||||
|
||||
from ansible.module_utils.six import iteritems
|
||||
|
||||
from ansible_collections.community.mysql.plugins.module_utils.mysql import (
|
||||
mysql_driver,
|
||||
get_server_implementation,
|
||||
|
@ -258,7 +256,7 @@ def user_add(cursor, user, host, host_all, password, encrypted,
|
|||
set_password_expire(cursor, user, host, password_expire, password_expire_interval)
|
||||
|
||||
if new_priv is not None:
|
||||
for db_table, priv in iteritems(new_priv):
|
||||
for db_table, priv in new_priv.items():
|
||||
privileges_grant(cursor, user, host, db_table, priv, tls_requires)
|
||||
if tls_requires is not None:
|
||||
privileges_grant(cursor, user, host, "*.*", get_grants(cursor, user, host), tls_requires)
|
||||
|
@ -449,7 +447,7 @@ def user_mod(cursor, user, host, host_all, password, encrypted,
|
|||
# If the user has privileges on a db.table that doesn't appear at all in
|
||||
# the new specification, then revoke all privileges on it.
|
||||
if not append_privs and not subtract_privs:
|
||||
for db_table, priv in iteritems(curr_priv):
|
||||
for db_table, priv in curr_priv.items():
|
||||
# If the user has the GRANT OPTION on a db.table, revoke it first.
|
||||
if "GRANT" in priv:
|
||||
grant_option = True
|
||||
|
@ -463,7 +461,7 @@ def user_mod(cursor, user, host, host_all, password, encrypted,
|
|||
# If the user doesn't currently have any privileges on a db.table, then
|
||||
# we can perform a straight grant operation.
|
||||
if not subtract_privs:
|
||||
for db_table, priv in iteritems(new_priv):
|
||||
for db_table, priv in new_priv.items():
|
||||
if db_table not in curr_priv:
|
||||
msg = "New privileges granted"
|
||||
if not module.check_mode:
|
||||
|
@ -950,7 +948,7 @@ def convert_priv_dict_to_str(priv):
|
|||
Returns:
|
||||
priv (str): String representation of input argument.
|
||||
"""
|
||||
priv_list = ['%s:%s' % (key, val) for key, val in iteritems(priv)]
|
||||
priv_list = ['%s:%s' % (key, val) for key, val in priv.items()]
|
||||
|
||||
return '/'.join(priv_list)
|
||||
|
||||
|
@ -1029,7 +1027,7 @@ def match_resource_limits(module, current, desired):
|
|||
|
||||
needs_to_change = {}
|
||||
|
||||
for key, val in iteritems(desired):
|
||||
for key, val in desired.items():
|
||||
if key not in current:
|
||||
# Supported keys are listed in the documentation
|
||||
# and must be determined in the get_resource_limits function
|
||||
|
@ -1082,7 +1080,7 @@ def limit_resources(module, cursor, user, host, resource_limits, check_mode):
|
|||
|
||||
# If not check_mode
|
||||
tmp = []
|
||||
for key, val in iteritems(needs_to_change):
|
||||
for key, val in needs_to_change.items():
|
||||
tmp.append('%s %s' % (key, val))
|
||||
|
||||
query = "ALTER USER %s@%s"
|
||||
|
|
|
@ -326,7 +326,6 @@ from ansible_collections.community.mysql.plugins.module_utils.user import (
|
|||
get_user_implementation,
|
||||
user_is_locked,
|
||||
)
|
||||
from ansible.module_utils.six import iteritems
|
||||
from ansible.module_utils._text import to_native
|
||||
|
||||
|
||||
|
@ -456,7 +455,7 @@ class MySQL_Info(object):
|
|||
engine = line['Engine']
|
||||
self.info['engines'][engine] = {}
|
||||
|
||||
for vname, val in iteritems(line):
|
||||
for vname, val in line.items():
|
||||
if vname != 'Engine':
|
||||
self.info['engines'][engine][vname] = val
|
||||
|
||||
|
@ -524,7 +523,7 @@ class MySQL_Info(object):
|
|||
res = self.__exec_sql(query)
|
||||
if res:
|
||||
for line in res:
|
||||
for vname, val in iteritems(line):
|
||||
for vname, val in line.items():
|
||||
self.info['master_status'][vname] = self.__convert(val)
|
||||
|
||||
def __get_slave_status(self):
|
||||
|
@ -545,7 +544,7 @@ class MySQL_Info(object):
|
|||
if user not in self.info['slave_status'][host][port]:
|
||||
self.info['slave_status'][host][port][user] = {}
|
||||
|
||||
for vname, val in iteritems(line):
|
||||
for vname, val in line.items():
|
||||
if vname not in ('Master_Host', 'Master_Port', 'Master_User'):
|
||||
self.info['slave_status'][host][port][user][vname] = self.__convert(val)
|
||||
|
||||
|
@ -559,7 +558,7 @@ class MySQL_Info(object):
|
|||
if srv_id not in self.info['slave_hosts']:
|
||||
self.info['slave_hosts'][srv_id] = {}
|
||||
|
||||
for vname, val in iteritems(line):
|
||||
for vname, val in line.items():
|
||||
if vname != 'Server_id':
|
||||
self.info['slave_hosts'][srv_id][vname] = self.__convert(val)
|
||||
|
||||
|
@ -575,7 +574,7 @@ class MySQL_Info(object):
|
|||
user = line['User']
|
||||
self.info['users'][host][user] = {}
|
||||
|
||||
for vname, val in iteritems(line):
|
||||
for vname, val in line.items():
|
||||
if vname not in ('Host', 'User'):
|
||||
self.info['users'][host][user][vname] = self.__convert(val)
|
||||
|
||||
|
|
|
@ -317,7 +317,6 @@ from ansible_collections.community.mysql.plugins.module_utils.user import (
|
|||
privileges_unpack,
|
||||
)
|
||||
from ansible.module_utils._text import to_native
|
||||
from ansible.module_utils.six import iteritems
|
||||
|
||||
|
||||
def normalize_users(module, users, is_mariadb=False):
|
||||
|
@ -788,7 +787,7 @@ class Role():
|
|||
self.update_members(users, set_default_role_all=set_default_role_all)
|
||||
|
||||
if privs:
|
||||
for db_table, priv in iteritems(privs):
|
||||
for db_table, priv in privs.items():
|
||||
privileges_grant(self.cursor, self.name, self.host,
|
||||
db_table, priv, tls_requires=None,
|
||||
maria_role=self.is_mariadb)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue