# HG changeset patch # User anatofuz # Date 1599026865 -32400 # Node ID 626b2d034d923c856cec855af0cc00e2de279745 # Parent faa3afacbfd52b84bf9e84abae387a2519420bd8 move setting-mariadb to install-mariadb/main.yml diff -r faa3afacbfd5 -r 626b2d034d92 roles/install-mariadb/tasks/main.yml --- 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 diff -r faa3afacbfd5 -r 626b2d034d92 tasks/setting-mariadb.yml --- 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