mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-06 10:40:36 -07:00
fix tests after keys returned have change in previous commit
This commit is contained in:
parent
ddd3812574
commit
62e9ad7812
1 changed files with 28 additions and 28 deletions
|
@ -43,36 +43,36 @@
|
|||
|
||||
- name: Mysql_info users_privs | Prepare common tests users
|
||||
community.mysql.mysql_user:
|
||||
name: "{{ item.user }}"
|
||||
name: "{{ item.name }}"
|
||||
host: "users_privs.com"
|
||||
password: '*6C387FC3893DBA1E3BA155E74754DA6682D04747'
|
||||
encrypted: true
|
||||
priv: "{{ item.privs }}"
|
||||
priv: "{{ item.priv }}"
|
||||
resource_limits: "{{ item.resource_limits | default(omit) }}"
|
||||
state: present
|
||||
loop:
|
||||
- user: users_privs_adm
|
||||
privs:
|
||||
- name: users_privs_adm
|
||||
priv:
|
||||
'*.*': 'ALL,GRANT'
|
||||
- user: users_privs_schema
|
||||
privs:
|
||||
- name: users_privs_schema
|
||||
priv:
|
||||
'users_privs_db.*': 'SELECT,INSERT,UPDATE,DELETE'
|
||||
- user: users_privs_table
|
||||
privs:
|
||||
- name: users_privs_table
|
||||
priv:
|
||||
'users_privs_db.t1': 'SELECT,INSERT,UPDATE'
|
||||
- user: users_privs_col
|
||||
privs:
|
||||
- name: users_privs_col
|
||||
priv:
|
||||
'users_privs_db.t1': 'SELECT (id)'
|
||||
resource_limits:
|
||||
MAX_USER_CONNECTIONS: 100
|
||||
- user: users_privs_proc
|
||||
privs:
|
||||
- name: users_privs_proc
|
||||
priv:
|
||||
'PROCEDURE users_privs_db.get_all_items': 'EXECUTE'
|
||||
resource_limits:
|
||||
MAX_USER_CONNECTIONS: 2
|
||||
MAX_CONNECTIONS_PER_HOUR: 60
|
||||
- user: users_privs_multi
|
||||
privs:
|
||||
- name: users_privs_multi
|
||||
priv:
|
||||
'mysql.*': 'SELECT'
|
||||
'users_privs_db.*': 'SELECT'
|
||||
- name: users_privs_usage_only
|
||||
|
@ -81,18 +81,18 @@
|
|||
|
||||
- name: Mysql_info users_privs | Prepare tests users for MariaDB
|
||||
community.mysql.mysql_user:
|
||||
name: "{{ item.user }}"
|
||||
name: "{{ item.name }}"
|
||||
host: "users_privs.com"
|
||||
plugin: "{{ item.plugin | default(omit) }}"
|
||||
plugin_auth_string: "{{ item.plugin_auth_string | default(omit) }}"
|
||||
plugin_hash_string: "{{ item.plugin_hash_string | default(omit) }}"
|
||||
tls_require: "{{ item.tls_require | default(omit) }}"
|
||||
priv: "{{ item.privs }}"
|
||||
priv: "{{ item.priv }}"
|
||||
resource_limits: "{{ item.resource_limits | default(omit) }}"
|
||||
state: present
|
||||
loop:
|
||||
- user: users_privs_socket # Only for MariaDB
|
||||
privs:
|
||||
- name: users_privs_socket # Only for MariaDB
|
||||
priv:
|
||||
'*.*': 'ALL'
|
||||
plugin: 'unix_socket'
|
||||
when:
|
||||
|
@ -100,7 +100,7 @@
|
|||
|
||||
- name: Mysql_info users_privs | Prepare tests users for MySQL
|
||||
community.mysql.mysql_user:
|
||||
name: "{{ item.user }}"
|
||||
name: "{{ item.name }}"
|
||||
host: "users_privs.com"
|
||||
password: "{{ item.password | default(omit) }}"
|
||||
encrypted: true
|
||||
|
@ -108,12 +108,12 @@
|
|||
plugin_auth_string: "{{ item.plugin_auth_string | default(omit) }}"
|
||||
plugin_hash_string: "{{ item.plugin_hash_string | default(omit) }}"
|
||||
tls_require: "{{ item.tls_require | default(omit) }}"
|
||||
priv: "{{ item.privs }}"
|
||||
priv: "{{ item.priv }}"
|
||||
resource_limits: "{{ item.resource_limits | default(omit) }}"
|
||||
state: present
|
||||
loop:
|
||||
- user: users_privs_sha256 # Only for MySQL
|
||||
privs:
|
||||
- name: users_privs_sha256 # Only for MySQL
|
||||
priv:
|
||||
'*.*': 'ALL'
|
||||
plugin_auth_string:
|
||||
'$5$/<w*D`L4\"F$WQiI1Pev.7atAh8udYs3wqlzgdfV8LXoy7rqSEC7NF2'
|
||||
|
@ -123,7 +123,7 @@
|
|||
|
||||
- name: Mysql_info users_privs | Prepare tests users for MySQL 8+
|
||||
community.mysql.mysql_user:
|
||||
name: "{{ item.user }}"
|
||||
name: "{{ item.name }}"
|
||||
host: "users_privs.com"
|
||||
password: "{{ item.password | default(omit) }}"
|
||||
encrypted: true
|
||||
|
@ -131,12 +131,12 @@
|
|||
plugin_auth_string: "{{ item.plugin_auth_string | default(omit) }}"
|
||||
plugin_hash_string: "{{ item.plugin_hash_string | default(omit) }}"
|
||||
tls_require: "{{ item.tls_require | default(omit) }}"
|
||||
priv: "{{ item.privs }}"
|
||||
priv: "{{ item.priv }}"
|
||||
resource_limits: "{{ item.resource_limits | default(omit) }}"
|
||||
state: present
|
||||
loop:
|
||||
- user: users_privs_caching_sha2 # Only for MySQL 8+
|
||||
privs:
|
||||
- name: users_privs_caching_sha2 # Only for MySQL 8+
|
||||
priv:
|
||||
'*.*': 'ALL'
|
||||
plugin_auth_string:
|
||||
'$A$005$61j/uF%Qb4-=O2xkeO82u2HNkF.lxDq0liO4U3xqi7bDUCbWM6HayRXWn1'
|
||||
|
@ -155,7 +155,7 @@
|
|||
|
||||
- name: Recreate users from mysql_info users_privs result
|
||||
community.mysql.mysql_user:
|
||||
name: "{{ item.user }}"
|
||||
name: "{{ item.name }}"
|
||||
host: "{{ item.host }}"
|
||||
plugin: "{{ item.plugin | default(omit) }}"
|
||||
plugin_auth_string: "{{ item.auth_string | default(omit) }}"
|
||||
|
@ -165,7 +165,7 @@
|
|||
state: present
|
||||
loop: "{{ result.users_privs }}"
|
||||
loop_control:
|
||||
label: "{{ item.user }}@{{ item.host }}"
|
||||
label: "{{ item.name }}@{{ item.host }}"
|
||||
register: recreate_users_result
|
||||
failed_when: recreate_users_result is changed
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue