diff --git a/README.md b/README.md index fc061a2..2740c36 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ The MySQL databases to create. A database has the values `name`, `encoding` (def mysql_users: [] -The MySQL users and their privileges. A user has the values `name`, `host` (defaults to `localhost`), `password`, `priv` (defaults to `*.*:USAGE`), and `append_privs` (defaults to `no`). The formats of these are the same as in the `mysql_user` module. +The MySQL users and their privileges. A user has the values `name`, `host` (defaults to `localhost`), `password`, `priv` (defaults to `*.*:USAGE`), `append_privs` (defaults to `no`), `state` (defaults to `present`). The formats of these are the same as in the `mysql_user` module. mysql_packages: - mysql diff --git a/tasks/users.yml b/tasks/users.yml index b94deef..6c41ce7 100644 --- a/tasks/users.yml +++ b/tasks/users.yml @@ -5,7 +5,7 @@ host: "{{ item.host | default('localhost') }}" password: "{{ item.password }}" priv: "{{ item.priv | default('*.*:USAGE') }}" - state: present + state: "{{ item.state | default('present') }}" append_privs: "{{ item.append_privs | default('no') }}" with_items: "{{ mysql_users }}" no_log: true