mirror of
https://github.com/HanXHX/ansible-mysql.git
synced 2026-03-14 11:42:09 +07:00
Manages "host_all" on users
This commit is contained in:
10
README.md
10
README.md
@@ -47,10 +47,14 @@ Example:
|
||||
|
||||
```
|
||||
mariadb_users:
|
||||
- name: 'kiki'
|
||||
- name: 'lorem'
|
||||
password: '123'
|
||||
priv: hihi.*:ALL
|
||||
host: '%'
|
||||
priv: lorem.*:ALL
|
||||
host: 'localhost'
|
||||
- name: 'ipsum'
|
||||
password: '465'
|
||||
priv: ipsum.*:ALL
|
||||
host_all: yes
|
||||
```
|
||||
|
||||
Check "priv" syntax in [mysql\_user module documentation](http://docs.ansible.com/mysql_user_module.html)
|
||||
|
||||
@@ -68,7 +68,8 @@
|
||||
name: "{{ item.name }}"
|
||||
password: "{{ item.password }}"
|
||||
priv: "{{ item.priv }}"
|
||||
host: "{{ item.host | default('localhost') }}"
|
||||
host: "{{ item.host | default(omit) }}"
|
||||
host_all: "{{ item.host_all | default(omit) }}"
|
||||
state: present
|
||||
with_items: "{{ mariadb_users }}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user