{ "run_list": [ "recipe[user::data_bag]", <% if @options.ruby_installer == 'rvm' %> "recipe[scratchify::pre_rvm]", "recipe[rvm::user]", <% elsif @options.ruby_installer == 'rbenv' %> "recipe[ruby_build]", "recipe[ruby_rbenv::user]", <% end %> "recipe[postgresql::server]", "recipe[postgresql::config_pgtune]", "recipe[postgresql::setup_users]", "recipe[postgresql::setup_databases]", "recipe[scratchify]", "recipe[nginx]", "recipe[scratchify::nginx_site]" ], "users": ["deploy"], <% if @options.ruby_installer == 'rvm' %> "rvm": { "user_default_ruby": "<%= @options.ruby_version %>", "user_install_rubies": true, "installs": { "deploy": true }, "user_installs": [ { "user": "deploy" } ], "gpg": {} }, <% elsif @options.ruby_installer == 'rbenv' %> "rbenv": { "user_installs": [ { "user": "deploy", "rubies": [{ "name": "<%= @options.ruby_version %>", "environment": { "RUBY_CONFIGURE_OPTS": "--disable-install-doc" } }], "global": "<%= @options.ruby_version %>" } ] }, <% end %> "postgresql": { "version": "9.4", "enable_pgdg_yum": true, "enable_pgdg_apt": true, "password": { "postgres": "<%= @options.postgresql_admin_password %>" }, "users": [ { "username": "<%= @options.app_name %>", "superuser": false, "createdb": false, "login": true, "password": "<%= @options.postgresql_user_password %>" } ], "databases": [ { "name": "<%= @options.app_name %>", "owner": "<%= @options.app_name %>" } ], "pg_hba": [ { "type": "host", "db": "all", "user": "all", "addr": "127.0.0.1/32", "method": "md5" }, { "type": "host", "db": "all", "user": "all", "addr": "::1/128", "method": "md5" } ], "config_pgtune": { "db_type": "web" } }, "scratchify": { "app_name": "<%= @options.app_name %>" }, "nginx": { "default_site_enabled": false, "pid": "/var/run/nginx.pid" }, "automatic": { "ipaddress": "<%= @options.host %>" } }