$ vagrant box add opscode-centos-6.5 http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box
$ ansible-playbook -i production site.yml
$ ansible-playbook -i production webserver.yml
もしくは
$ ansible-playbook -i production site.yml -limit webservers
- porduction
- stage
このサンプルはVagrantを使ってて、production
もstage
も同じ設定。
webservers
とdbservers
の2つのグループを設定
共通ロール
- epel, remiリポジトリ追加
- libselinux-pythonインストール(これ無いとどっかでエラーになる。忘れた…
- vimインストール
- gitインストール
Webサーバー
- nginxインストール
- rbenvインストール
- rubyインストール
dbサーバー
- mysqlインストール
ぼくの環境だとsshの時にToo many authentication failures for
ってエラーがよく出るのでsshの引数を設定している。
- nginxのconf
- mysqlのconf
- iptable設定