Created
July 9, 2014 07:46
-
-
Save Yasushi/6e2f11badc3c2a9b4970 to your computer and use it in GitHub Desktop.
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
--- | |
- hosts: all | |
sudo: yes | |
tasks: | |
- yum: name={{ item }} | |
with_items: | |
- libselinux-python | |
- unzip | |
- openssh-clients | |
- git | |
- rsync | |
- local_action: get_url dest=./epel-release-7-0.2.noarch.rpm url=http://ftp.riken.jp/Linux/fedora/epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm | |
- copy: dest=/root/epel-release-7-0.2.noarch.rpm src=./epel-release-7-0.2.noarch.rpm | |
- yum: name=/root/epel-release-7-0.2.noarch.rpm | |
- replace: dest=/etc/yum.repos.d/epel.repo regexp="^enabled=1" replace="enabled=0" | |
- yum: name={{ item }} | |
with_items: | |
- ruby | |
- rubygem-bundler | |
- libxml2-devel | |
- libxslt-devel | |
- sqlite-devel | |
- postgresql-devel | |
- postgresql-server | |
- python-psycopg2 | |
- gcc | |
- gcc-c++ | |
- make | |
- yum: name={{ item }} enablerepo=base | |
with_items: | |
- ruby-devel | |
- yum: name=nodejs enablerepo=epel | |
- firewalld: port=3000/tcp permanent=true state=enabled | |
- command: postgresql-setup initdb creates=/var/lib/pgsql/data/PG_VERSION | |
- lineinfile: dest=/var/lib/pgsql/data/pg_hba.conf regexp="^host .* 127.0.0.1/32" line="host all all 127.0.0.1/32 md5" | |
- lineinfile: dest=/var/lib/pgsql/data/pg_hba.conf regexp="^host .* ::1/128" line="host all all ::1/128 md5" | |
- service: name=postgresql state=started enabled=yes | |
- hosts: all | |
sudo: yes | |
sudo_user: postgres | |
gather_facts: no | |
vars: | |
kandanpass: something | |
tasks: | |
- postgresql_db: name=kandan_production encoding=UTF-8 lc_collate=ja_JP.UTF-8 lc_ctype=ja_JP.UTF-8 | |
- postgresql_user: db=kandan_production name=kandan password={{ kandanpass }} priv=ALL | |
# git clone https://github.com/kandanapp/kandan | |
# bundle install --path vendor/bundle | |
# database.yml | |
# production: | |
# adapter: postgresql | |
# host: localhost | |
# database: kandan_production | |
# pool: 5 | |
# timeout: 5000 | |
# username: kandan | |
# password: something | |
# config/environments/production.rb | |
# config.serve_static_assets = true | |
# bundle exec rake RAILS_ENV=production db:migrate kandan:bootstrap assets:precompile | |
# bundle exec thin -e production start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment