This repository has been archived by the owner on Feb 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redmine 3.2対応 + データベースをPostgreSQLに変更
- Loading branch information
Showing
14 changed files
with
185 additions
and
133 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- pg_hba.conf.org 2015-12-06 15:49:05.282188570 +0900 | ||
+++ pg_hba.conf 2015-12-06 15:33:01.377197287 +0900 | ||
@@ -71,6 +71,8 @@ | ||
# "host" records. In that case you will also need to make PostgreSQL | ||
# listen on a non-local interface via the listen_addresses | ||
# configuration parameter, or via the -i or -h command line switches. | ||
+host redmine redmine 127.0.0.1/32 md5 | ||
+host redmine redmine ::1/128 md5 | ||
|
||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
- name: PostgreSQL initdb | ||
command: | ||
postgresql-setup initdb | ||
register: | ||
result | ||
failed_when: result.rc not in [0, 1] | ||
changed_when: result.rc == 0 | ||
|
||
- name: pg_hba.confにredmine用設定が存在するか確認 | ||
sudo: yes | ||
command: | ||
grep redmine {{ pg_hba_conf_path }} | ||
register: | ||
result_pg_hba | ||
failed_when: result_pg_hba.rc not in [0, 1] | ||
changed_when: false | ||
|
||
- name: pg_hba.conf設定変更用パッチを配置 | ||
sudo: yes | ||
copy: | ||
src=pg_hba_conf.patch | ||
dest={{ work_dir }} | ||
when: | ||
result_pg_hba.rc == 1 | ||
|
||
- name: pg_hba.confにredmine用設定を追加 | ||
sudo: yes | ||
shell: | ||
patch -tNp0 {{ pg_hba_conf_path }} < {{ work_dir }}/pg_hba_conf.patch | ||
when: | ||
result_pg_hba.rc == 1 | ||
|
||
- name: PostgreSQL起動 | ||
sudo: yes | ||
service: | ||
name=postgresql | ||
state=restarted | ||
enabled=yes | ||
|
||
- name: PostgreSQL ユーザー作成 | ||
sudo: yes | ||
sudo_user: postgres | ||
postgresql_user: | ||
name=redmine | ||
password={{ db_passwd_redmine }} | ||
|
||
- name: PostgreSQL データベース作成 | ||
sudo: yes | ||
sudo_user: postgres | ||
postgresql_db: | ||
name=redmine | ||
encoding='UTF-8' | ||
lc_collate='ja_JP.UTF-8' | ||
lc_ctype='ja_JP.UTF-8' | ||
template='template0' |
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
Oops, something went wrong.