Mercurial > hg > Members > anatofuz > wordpress_ansible
changeset 12:626b2d034d92
move setting-mariadb to install-mariadb/main.yml
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 02 Sep 2020 15:07:45 +0900 |
parents | faa3afacbfd5 |
children | 0331a4ed161b |
files | roles/install-mariadb/tasks/main.yml tasks/setting-mariadb.yml |
diffstat | 2 files changed, 16 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/roles/install-mariadb/tasks/main.yml Wed Sep 02 13:47:47 2020 +0900 +++ b/roles/install-mariadb/tasks/main.yml Wed Sep 02 15:07:45 2020 +0900 @@ -16,3 +16,19 @@ name: mariadb state: restarted enabled: yes + +- name: create a database wordpress + become: yes + mysql_db: + name: wordpress + state: present + encoding: utf8 + +- name: create a MySQL user wordpress and give wordpress.* all privileges + become: yes + mysql_user: + name: wordpress + password: "hZzTwWuTeN" + priv: "wordpress.*:ALL" + host: localhost + state: present
--- a/tasks/setting-mariadb.yml Wed Sep 02 13:47:47 2020 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -- name: データベース wordpress を作成 - become: yes - mysql_db: - name: wordpress - state: present - encoding: utf8 - -- name: MySQLユーザー wordpress を作成し,wordpress.* にすべての権限を与える - become: yes - mysql_user: - name: wordpress - password: "hZzTwWuTeN" - priv: "wordpress.*:ALL" - host: localhost - state: present