This repository has been archived by the owner on May 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b9b9ae
commit 685a973
Showing
14 changed files
with
53 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
--- | ||
# file: roles/mysql_server/tasks/main.yml | ||
|
||
- name: predefine mysql root passwd | ||
- name: predefine MySQL root passwd | ||
shell: executable=/bin/bash debconf-set-selections <<< "mysql-server-5.5 mysql-server/root_password password hive_{{ site_name }}" | ||
|
||
- name: predefine mysql root passwd confirm | ||
- name: predefine MySQL root passwd confirm | ||
shell: executable=/bin/bash debconf-set-selections <<< "mysql-server-5.5 mysql-server/root_password_again password hive_{{ site_name }}" | ||
|
||
- name: install MySQL and related-package via apt | ||
- name: install MySQL via apt | ||
apt: name={{ item }} | ||
update_cache=yes | ||
with_items: | ||
- mysql-server-5.5 | ||
- libmysql-java | ||
- python-mysqldb | ||
tags: | ||
- mysql | ||
|
||
- name: service mysql restart | ||
service: name=mysql state=restarted | ||
|
||
- name: create mysql db 'metastore' | ||
mysql_db: name=metastore | ||
state=present | ||
login_user=root | ||
login_password=hive_{{ site_name }} | ||
- name: create MySQL db 'metastore' | ||
mysql_db: name=metastore state=present | ||
login_user=root login_password=hive_{{ site_name }} | ||
tags: | ||
- mysql | ||
- hive | ||
|
||
- name: init metastore schema | ||
shell: mysql -uroot -phive_{{ site_name }} metastore < /usr/lib/hive/scripts/metastore/upgrade/mysql/hive-schema-0.10.0.mysql.sql | ||
tags: | ||
- mysql | ||
- hive | ||
|
||
- name: add mysql user 'hiveuser' | ||
mysql_user: name=hiveuser | ||
host=localhost | ||
password=hive_{{ site_name }} | ||
priv=metastore.*:ALL | ||
state=present | ||
login_user=root | ||
login_password=hive_{{ site_name }} | ||
- name: add MySQL user 'hiveuser' | ||
mysql_user: name=hiveuser host=localhost password=hive_{{ site_name }} priv=metastore.*:ALL state=present | ||
login_user=root login_password=hive_{{ site_name }} | ||
tags: | ||
- mysql | ||
- hive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters