mysql users with host management

pull/6/head
Emilien Mantel 2015-08-08 13:02:59 +02:00
parent ee296f5cf8
commit faa63a96d4
2 changed files with 7 additions and 1 deletions

View File

@ -35,6 +35,7 @@ mysql_users:
- name: 'kiki'
password: '123'
priv: hihi.*:ALL
host: '%'
```
Check "priv" syntax in [http://docs.ansible.com/mysql_user_module.html](mysql_user module documentation)

View File

@ -29,6 +29,11 @@
with_items: mysql_databases
- 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