farend / redmine-centos-ansible Goto Github PK
View Code? Open in Web Editor NEWRedmineをCentOSに自動インストールためのAnsibleプレイブック
License: MIT License
RedmineをCentOSに自動インストールためのAnsibleプレイブック
License: MIT License
問題はタイトルのとおりです。
firewalldがインストールされていることを、前提条件として記載したほうがよいと思います。
TASK [system : firewalldでHTTPを許可] ********************************************** fatal: [localhost]: FAILED! => {"changed": false, "cmd": "firewall-cmd --zone=public --add-service=http --permanent", "failed": true, "msg": "[Errno 2] そのようなファイルやディレクトリはありません", "rc": 2}
# yum install -y firewalld
TASK [system : firewalldが起動しているか確認] ******************************************** ok: [localhost]
TASK [pg : pg_hba.confにredmine用設定が存在するか確認] *************************************
fatal: [localhost]: FAILED! => {"changed": false, "cmd": ["grep", "redmine", "/var/lib/pgsql/data/pg_hba.conf"], "delta": "0:00:00.002402", "end": "2016-08-26 06:35:31.527254", "failed": true, "failed_when_result": true, "rc": 2, "start": "2016-08-26 06:35:31.524852", "stderr": "grep: /var/lib/pgsql/data/pg_hba.conf: No such file or directory", "stdout": "", "stdout_lines": [], "warnings": []}
sudo postgresql-setup initdb
Ansible Playbook を実行したところ、redmine : gemsパッケージのインストール
で失敗します。
実際の環境で実行して確認してみたところ、以下のようなログがありました。
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (< 2.0.0, >= 1.5.0)
Current Bundler version:
bundler (2.0.1)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (< 2.0.0, >= 1.5.0)' in any of the relevant sources:
the local ruby installation
bundler-2.0.1
がリリースされたため、Gemfile に記述された bundler
のバージョン要件に合致していないことが理由だと思います。
ちなみに、Redmine 3.4.7内の Gemfile
を確認するとこのようなバージョン要件の記載はなさそうでした。
下記のようなエラーで止まるため Ruby を手動で展開して回避しました。
ほかは特に問題ありませんでした。
TASK [ruby : Rubyのソースコードを展開] ***************************************************
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Unexpected error when accessing exploded file: [Errno 2] そのようなファイルやディレクトリはありません: '/tmp/redmine-setup/ruby-2.2.3'"}
Ruby 手動で展開
# cd /tmp/redmine-setup/
# tar xjvf ruby-2.2.3.tar.bz2
環境
CentOS Linux release 7.2.1511 (Core)
Linux ncredmine531v 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
下記 Centos.org 公式の7系AMIからインスタンスを立ち上げて、ansibleを実行してみたところ、ansible自体は正常に終了するが、Redmineは正常動作しませんでした。
https://aws.amazon.com/marketplace/pp/B00O7WM7QW
playbookは現時点(2018/02/19)時点でのmasterブランチを利用しています。
READMEの手順以外で叩いたコマンドとしては、一番最初に yum update -y
しています。
少し深追いしてみた結果は以下の通りです。
これは、systemctl の httpd.service が PrivateTmp trueになっているせいかなと思います。
参考: https://qiita.com/ayweak/items/decd9812c73e945c6b7b
それにしても、PrivateTmp falseにした状態でもpassenger-statusはエラーになりました。
/var/log/httpd/error_log
AH01276: Cannot serve directory /var/lib/redmine/public/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
外してみましたがダメでした。全体的にnot foundになります。
その後もAllowOverrideとか色々頑張ってみましたが、どうにもうまくいけませんでしたのでissueとして挙げさせていただきます。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.