roles/mariadb: Add plays for creating WordPress db/users
Relies on the host having a dict with appropriate values defined, for example: wordpress_blogs: - site_name: blah.com wordpress_version: 3.9.2 wordpress_db_user: db_user wordpress_db_name: db_name wordpress_db_pass: V9&XvvKu1hYl Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
parent
fafd475f6b
commit
850a6a8da3
@ -33,4 +33,14 @@
|
||||
template: src=.my.cnf.j2 dest=/root/.my.cnf owner=root mode=0600
|
||||
tags: mariadb
|
||||
|
||||
- name: Create WordPress database(s)
|
||||
mysql_db: db={{ item.wordpress_db_name }} state=present
|
||||
with_items: wordpress_blogs
|
||||
tags: mariadb
|
||||
|
||||
- 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
|
||||
with_items: wordpress_blogs
|
||||
tags: mariadb
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
Loading…
Reference in New Issue
Block a user