diff --git a/mysql/tasks/manage_my_db.yml b/mysql/tasks/manage_my_db.yml index 35f9a8cd..fe4de4ad 100644 --- a/mysql/tasks/manage_my_db.yml +++ b/mysql/tasks/manage_my_db.yml @@ -11,4 +11,14 @@ - '{{ mysql_db_data | default([]) }}' - allowed_hosts when: item.0.name is defined - tags: [ 'mysql', 'mysql_db' ] + tags: [ 'mysql', 'mysql_db', 'mysql_user' ] + +- name: Additional user privileges, if defined + mysql_user: name={{ item.0.user }} append_privs=yes priv="{{ item.0.name }}.*:{{ item.0.additional_privs }}" state=present + with_subelements: + - '{{ mysql_db_data | default([]) }}' + - allowed_hosts + when: + - item.0.name is defined + - item.0.additional_privs is defined + tags: [ 'mysql', 'mysql_db', 'mysql_user' ] diff --git a/piwik/defaults/main.yml b/piwik/defaults/main.yml index 14ea16f3..f14840b7 100644 --- a/piwik/defaults/main.yml +++ b/piwik/defaults/main.yml @@ -20,4 +20,6 @@ piwik_pkgs: - php5-json - php5-ldap - php5-gd + - php5-redis +