Manages "host_all" on users

pull/35/head
Emilien Mantel 2019-01-25 11:42:04 +01:00
parent e9b46e347e
commit fb4c70827c
2 changed files with 9 additions and 4 deletions

View File

@ -47,10 +47,14 @@ Example:
``` ```
mariadb_users: mariadb_users:
- name: 'kiki' - name: 'lorem'
password: '123' password: '123'
priv: hihi.*:ALL priv: lorem.*:ALL
host: '%' 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) Check "priv" syntax in [mysql\_user module documentation](http://docs.ansible.com/mysql_user_module.html)

View File

@ -68,7 +68,8 @@
name: "{{ item.name }}" name: "{{ item.name }}"
password: "{{ item.password }}" password: "{{ item.password }}"
priv: "{{ item.priv }}" priv: "{{ item.priv }}"
host: "{{ item.host | default('localhost') }}" host: "{{ item.host | default(omit) }}"
host_all: "{{ item.host_all | default(omit) }}"
state: present state: present
with_items: "{{ mariadb_users }}" with_items: "{{ mariadb_users }}"