mysql users with host management
parent
ee296f5cf8
commit
faa63a96d4
|
@ -35,6 +35,7 @@ mysql_users:
|
||||||
- name: 'kiki'
|
- name: 'kiki'
|
||||||
password: '123'
|
password: '123'
|
||||||
priv: hihi.*:ALL
|
priv: hihi.*:ALL
|
||||||
|
host: '%'
|
||||||
```
|
```
|
||||||
|
|
||||||
Check "priv" syntax in [http://docs.ansible.com/mysql_user_module.html](mysql_user module documentation)
|
Check "priv" syntax in [http://docs.ansible.com/mysql_user_module.html](mysql_user module documentation)
|
||||||
|
|
|
@ -29,6 +29,11 @@
|
||||||
with_items: mysql_databases
|
with_items: mysql_databases
|
||||||
|
|
||||||
- name: MYSQL_USER | Manages users...
|
- name: MYSQL_USER | Manages users...
|
||||||
mysql_user: name={{ item.name }} password={{ item.password }} priv={{ item.priv }} state=present
|
mysql_user: >
|
||||||
|
name={{ item.name }}
|
||||||
|
password={{ item.password }}
|
||||||
|
priv={{ item.priv }}
|
||||||
|
host={{ item.host | default('localhost') }}
|
||||||
|
state=present
|
||||||
with_items: mysql_users
|
with_items: mysql_users
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue