ci: fix certification.yml GitHub workflow (#776)
Some checks failed
Plugins CI / Sanity (Ⓐdevel) (push) Has been cancelled
Plugins CI / Sanity (Ⓐstable-2.17) (push) Has been cancelled
Plugins CI / Sanity (Ⓐstable-2.18) (push) Has been cancelled
Plugins CI / Sanity (Ⓐstable-2.19) (push) Has been cancelled
Plugins CI / Sanity (Ⓐstable-2.20) (push) Has been cancelled
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.8.3, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐdevel, DB: mysql 8.4.1, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.8.3, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐdevel, DB: mysql 8.4.1, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐdevel, DB: mariadb 11.8.3, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐdevel, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.16, DB: mariadb 10.11.8, connector: pymysql 0.10.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.8.3, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.17, DB: mysql 8.4.1, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.8.3, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.17, DB: mysql 8.4.1, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.17, DB: mariadb 11.8.3, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.17, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 10.11.8, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.8.3, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.4.1, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 10.11.8, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.8.3, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.4.1, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 10.11.8, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.18, DB: mariadb 11.8.3, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.0.38, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.18, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 10.11.8, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.8.3, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.4.1, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 10.11.8, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.8.3, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.4.1, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 10.11.8, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.19, DB: mariadb 11.8.3, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.0.38, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.19, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.20, DB: mariadb 10.11.8, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.20, DB: mariadb 11.8.3, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.20, DB: mysql 8.0.38, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.20, DB: mysql 8.4.1, connector: pymysql 0.9.3) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.20, DB: mariadb 10.11.8, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.20, DB: mariadb 11.8.3, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.20, DB: mysql 8.0.38, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.20, DB: mysql 8.4.1, connector: pymysql 1.0.2) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.20, DB: mariadb 10.11.8, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.20, DB: mariadb 11.8.3, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.20, DB: mysql 8.0.38, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Integration (Ⓐstable-2.20, DB: mysql 8.4.1, connector: pymysql 1.1.1) (push) Has been cancelled
Plugins CI / Units (Ⓐdevel, Python3.10) (push) Has been cancelled
Plugins CI / Units (Ⓐdevel, Python3.11) (push) Has been cancelled
Plugins CI / Units (Ⓐstable-2.18, Python3.10) (push) Has been cancelled
Plugins CI / Units (Ⓐstable-2.18, Python3.11) (push) Has been cancelled
Plugins CI / Units (Ⓐstable-2.18, Python3.8) (push) Has been cancelled
Plugins CI / Units (Ⓐstable-2.18, Python3.9) (push) Has been cancelled
Plugins CI / Units (Ⓐstable-2.19, Python3.10) (push) Has been cancelled
Plugins CI / Units (Ⓐstable-2.19, Python3.11) (push) Has been cancelled
Plugins CI / Units (Ⓐstable-2.19, Python3.9) (push) Has been cancelled
Plugins CI / Units (Ⓐstable-2.20, Python3.10) (push) Has been cancelled
Plugins CI / Units (Ⓐstable-2.20, Python3.11) (push) Has been cancelled

* ci: fix certification.yml GitHub workflow

* added .ansible-lint file, excluded changelogs/ and tests/ from Linting

* added .ansible-lint file, excluded .github/ and meta/ from Linting

* .ansible-lint file: excluded .github/ from Linting

* Fixed indentation in modules EXAMPLES

* Fixed indentation
This commit is contained in:
Andrew Klychkov 2026-02-27 09:39:09 +01:00 committed by GitHub
commit 8d380a9be5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 56 additions and 51 deletions

5
.ansible-lint Normal file
View file

@ -0,0 +1,5 @@
exclude_paths:
- changelogs/
- tests/
- .github/
- meta/

View file

@ -32,4 +32,4 @@ concurrency:
# for each affected version of ansible-core (for example, `tests/sanity/ignore-2.18.txt`) and add corresponding entries.
jobs:
call:
uses: ansible-collections/partner-certification-checker/.github/workflows/certification-reusable.yml@0.1
uses: ansible-collections/partner-certification-checker/.github/workflows/certification-reusable.yml@v0.1.0

View file

@ -112,58 +112,58 @@ EXAMPLES = r'''
become: true
community.mysql.mysql_info:
filter:
- databases
- version
- databases
- version
- name: Collect info about databases and version using ~alice/.my.cnf as a credential file
become: true
community.mysql.mysql_info:
config_file: /home/alice/.my.cnf
filter:
- databases
- version
- databases
- version
- name: Collect info about databases including empty and excluding their sizes
become: true
community.mysql.mysql_info:
config_file: /home/alice/.my.cnf
filter:
- databases
- databases
exclude_fields: db_size
return_empty_dbs: true
- name: Clone users from one server to another
block:
# Step 1
- name: Fetch information from a source server
delegate_to: server_source
community.mysql.mysql_info:
filter:
- users_info
register: result
# Step 1
- name: Fetch information from a source server
delegate_to: server_source
community.mysql.mysql_info:
filter:
- users_info
register: result
# Step 2
# Don't work with sha256_password and cache_sha2_password
- name: Clone users fetched in a previous task to a target server
community.mysql.mysql_user:
name: "{{ item.name }}"
host: "{{ item.host }}"
plugin: "{{ item.plugin | default(omit) }}"
plugin_hash_string: "{{ item.plugin_hash_string | default(omit) }}"
tls_requires: "{{ item.tls_requires | default(omit) }}"
priv: "{{ item.priv | default(omit) }}"
resource_limits: "{{ item.resource_limits | default(omit) }}"
locked: "{{ item.locked | default(omit) }}"
column_case_sensitive: true
state: present
loop: "{{ result.users_info }}"
loop_control:
label: "{{ item.name }}@{{ item.host }}"
when:
- item.name != 'root' # In case you don't want to import admin accounts
- item.name != 'mariadb.sys'
- item.name != 'mysql'
- item.name != 'PUBLIC' # MariaDB roles are not supported
# Step 2
# Don't work with sha256_password and cache_sha2_password
- name: Clone users fetched in a previous task to a target server
community.mysql.mysql_user:
name: "{{ item.name }}"
host: "{{ item.host }}"
plugin: "{{ item.plugin | default(omit) }}"
plugin_hash_string: "{{ item.plugin_hash_string | default(omit) }}"
tls_requires: "{{ item.tls_requires | default(omit) }}"
priv: "{{ item.priv | default(omit) }}"
resource_limits: "{{ item.resource_limits | default(omit) }}"
locked: "{{ item.locked | default(omit) }}"
column_case_sensitive: true
state: present
loop: "{{ result.users_info }}"
loop_control:
label: "{{ item.name }}@{{ item.host }}"
when:
- item.name != 'root' # In case you don't want to import admin accounts
- item.name != 'mariadb.sys'
- item.name != 'mysql'
- item.name != 'PUBLIC' # MariaDB roles are not supported
'''
RETURN = r'''

View file

@ -86,8 +86,8 @@ EXAMPLES = r'''
login_db: acme
query: SELECT * FROM acme WHERE id = %s AND story = %s
positional_args:
- 1
- test
- 1
- test
- name: Select query to test_db with named_args
community.mysql.mysql_query:
@ -101,8 +101,8 @@ EXAMPLES = r'''
community.mysql.mysql_query:
login_db: test_db
query:
- INSERT INTO articles (id, story) VALUES (2, 'my_long_story')
- INSERT INTO prices (id, price) VALUES (123, '100.00')
- INSERT INTO articles (id, story) VALUES (2, 'my_long_story')
- INSERT INTO prices (id, price) VALUES (123, '100.00')
single_transaction: true
'''

View file

@ -197,8 +197,8 @@ EXAMPLES = r'''
state: present
priv: '*.*:ALL'
members:
- 'alice@%'
- 'bob@%'
- 'alice@%'
- 'bob@%'
- name: Same as above but do not run SET DEFAULT ROLE ALL TO each member
community.mysql.mysql_role:
@ -206,8 +206,8 @@ EXAMPLES = r'''
state: present
priv: '*.*:ALL'
members:
- 'alice@%'
- 'bob@%'
- 'alice@%'
- 'bob@%'
set_default_role_all: false
# Assuming that the role developers exists,
@ -218,7 +218,7 @@ EXAMPLES = r'''
state: present
append_members: true
members:
- 'joe@localhost'
- 'joe@localhost'
# Create role readers with the SELECT privilege
# on all tables in the fiction database
@ -250,7 +250,7 @@ EXAMPLES = r'''
state: present
name: readers
members:
- 'joe@localhost'
- 'joe@localhost'
detach_members: true
- name: Remove the role readers if exists
@ -279,7 +279,7 @@ EXAMPLES = r'''
state: present
name: business
members:
- marketing
- marketing
- name: Ensure the role foo does not have the DELETE privilege
community.mysql.mysql_role:
@ -296,8 +296,8 @@ EXAMPLES = r'''
append_members: true
members_must_exist: false
members:
- 'existing_user@localhost'
- 'not_existing_user@localhost'
- 'existing_user@localhost'
- 'not_existing_user@localhost'
- name: Detach some members from a role and ignore not-existent users
community.mysql.mysql_role:
@ -306,8 +306,8 @@ EXAMPLES = r'''
detach_members: true
members_must_exist: false
members:
- 'existing_user@localhost'
- 'not_existing_user@localhost'
- 'existing_user@localhost'
- 'not_existing_user@localhost'
- name: Create role without binary logging
community.mysql.mysql_role: