mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-08 11:40:33 -07:00
document example with tasks grouped in a block
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
This commit is contained in:
parent
154d880846
commit
509099e211
1 changed files with 30 additions and 27 deletions
|
@ -126,15 +126,19 @@ EXAMPLES = r'''
|
||||||
exclude_fields: db_size
|
exclude_fields: db_size
|
||||||
return_empty_dbs: true
|
return_empty_dbs: true
|
||||||
|
|
||||||
- name: Clone users on another server - Step 1
|
- name: Clone users from one server to another
|
||||||
|
block:
|
||||||
|
# Step 1
|
||||||
|
- name: Fetch information from a source server
|
||||||
delegate_to: server_source
|
delegate_to: server_source
|
||||||
community.mysql.mysql_info:
|
community.mysql.mysql_info:
|
||||||
filter:
|
filter:
|
||||||
- users_privs
|
- users_privs
|
||||||
register: result
|
register: result
|
||||||
|
|
||||||
# Don't work with sha256_password and cache_sha2_password
|
# Step 2
|
||||||
- name: Clone users on another server - 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:
|
community.mysql.mysql_user:
|
||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
host: "{{ item.host }}"
|
host: "{{ item.host }}"
|
||||||
|
@ -153,7 +157,6 @@ EXAMPLES = r'''
|
||||||
- item.name != 'root' # In case you don't want to import admin accounts
|
- item.name != 'root' # In case you don't want to import admin accounts
|
||||||
- item.name != 'mariadb.sys'
|
- item.name != 'mariadb.sys'
|
||||||
- item.name != 'mysql'
|
- item.name != 'mysql'
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
RETURN = r'''
|
RETURN = r'''
|
||||||
|
|
Loading…
Add table
Reference in a new issue