roles/mariadb: Create WordPress db/users when necessary

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
Alan Orth 2014-08-28 14:29:23 +03:00
parent 850a6a8da3
commit e24464941f
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -36,11 +36,13 @@
- name: Create WordPress database(s) - name: Create WordPress database(s)
mysql_db: db={{ item.wordpress_db_name }} state=present mysql_db: db={{ item.wordpress_db_name }} state=present
with_items: wordpress_blogs with_items: wordpress_blogs
when: wordpress_blogs is defined
tags: mariadb tags: mariadb
- name: Create WordPress user(s) - name: Create WordPress user(s)
mysql_user: name={{ item.wordpress_db_user }} password={{ item.wordpress_db_pass }} priv={{ item.wordpress_db_name }}.*:ALL state=present mysql_user: name={{ item.wordpress_db_user }} password={{ item.wordpress_db_pass }} priv={{ item.wordpress_db_name }}.*:ALL state=present
with_items: wordpress_blogs with_items: wordpress_blogs
when: wordpress_blogs is defined
tags: mariadb tags: mariadb
# vim: set ts=2 sw=2: # vim: set ts=2 sw=2: