--- # ----------------------------------------------------------------------------- # secrets # load all passwords from a local location outside of version control # ----------------------------------------------------------------------------- # do not add a trailing slash to the path secrets_load_path: /home/yourname/dev/testproj/secrets secrets_postgres_password: "{{ lookup('password', secrets_load_path + '/postgres_password') }}" secrets_redis_password: "{{ lookup('password', secrets_load_path + '/redis_password') }}" secrets_mail_password: "{{ lookup('password', secrets_load_path + '/mail_password') }}" secrets_rails_token: "{{ lookup('password', secrets_load_path + '/rails_token') }}" secrets_devise_token: "{{ lookup('password', secrets_load_path + '/devise_token') }}" secrets_devise_pepper_token: "{{ lookup('password', secrets_load_path + '/devise_pepper_token') }}" # ----------------------------------------------------------------------------- # ansible # ----------------------------------------------------------------------------- # default values you can overwrite with documentation: # http://docs.ansible.com/intro_inventory.html#list-of-behavioral-inventory-parameters # ----------------------------------------------------------------------------- ansible_ssh_user: deploy # ----------------------------------------------------------------------------- # locale # ----------------------------------------------------------------------------- # default values you can overwrite with documentation: # https://github.com/nickjj/ansible-locale/#role-variables # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # user # ----------------------------------------------------------------------------- # default values you can overwrite with documentation: # https://github.com/nickjj/ansible-user/#role-variables # ----------------------------------------------------------------------------- user_name: "{{ ansible_ssh_user }}" # ----------------------------------------------------------------------------- # postgres # ----------------------------------------------------------------------------- # default values you can overwrite with documentation: # https://github.com/nickjj/ansible-postgres/#role-variables # ----------------------------------------------------------------------------- postgres_user: "{{ user_name }}" postgres_password: "{{ secrets_postgres_password }}" # ----------------------------------------------------------------------------- # redis # ----------------------------------------------------------------------------- # default values you can overwrite with documentation: # https://github.com/DavidWittman/ansible-redis/blob/master/defaults/main.yml # ----------------------------------------------------------------------------- redis_bind: 0.0.0.0 redis_port: 6379 redis_install_dir: /usr/local redis_dir: /usr/local/redis redis_password: "{{ secrets_redis_password }}" # ----------------------------------------------------------------------------- # rails # ----------------------------------------------------------------------------- # default values you can overwrite with documentation: # https://github.com/nickjj/ansible-rails/#role-variables # ----------------------------------------------------------------------------- rails_deploy_app_name: testproj rails_deploy_user: "{{ user_name }}" rails_deploy_ssh_keypair_local_path: "{{ secrets_load_path }}" rails_deploy_git_url: "git@bitbucket.org:yourname/testproj.git" rails_deploy_migrate_master_host: "{{ groups['app'][0] }}" rails_deploy_env: RAILS_ENV: production SOURCE_ENV_PATH: "/etc/default/{{ rails_deploy_app_name }}" PROJECT_PATH: "{{ rails_deploy_path }}" TIME_ZONE: Eastern Time (US & Canada) DEFAULT_LOCALE: en GOOGLE_ANALYTICS_UA: "" DISQUS_SHORT_NAME: "" S3_ACCESS_KEY_ID: "" S3_SECRET_ACCESS_KEY: "" S3_REGION: "" DATABASE_HOST: localhost DATABASE_NAME: "{{ rails_deploy_app_name }}" DATABASE_USERNAME: "{{ postgres_user }}" DATABASE_PASSWORD: "{{ postgres_password }}" DATABASE_POOL: 25 DATABASE_TIMEOUT: 5000 CACHE_HOST: "{{ redis_bind }}" CACHE_PORT: "{{ redis_port }}" CACHE_DATABASE: 0 CACHE_PASSWORD: "{{ secrets_redis_password }}" TOKEN_RAILS_SECRET: "{{ secrets_rails_token }}" TOKEN_DEVISE_SECRET: "{{ secrets_devise_token }}" TOKEN_DEVISE_PEPPER: "{{ secrets_devise_pepper_token }}" SMTP_ADDRESS: smtp.gmail.com SMTP_PORT: 587 # 465 if you use ssl SMTP_DOMAIN: gmail.com SMTP_USERNAME: info@testproj.com SMTP_PASSWORD: "{{ secrets_mail_password }}" SMTP_AUTH: plain SMTP_ENCRYPTION: starttls ACTION_MAILER_HOST: www.testproj.com ACTION_MAILER_DEFAULT_FROM: info@testproj.com ACTION_MAILER_DEFAULT_TO: me@testproj.com ACTION_MAILER_DEVISE_DEFAULT_FROM: info@testproj.com PUMA_THREADS_MIN: 0 PUMA_THREADS_MAX: 16 PUMA_WORKERS: "{{ ansible_processor_cores if ansible_processor_cores > 1 else 2 }}" SIDEKIQ_CONCURRENCY: 25 # ----------------------------------------------------------------------------- # whenever # ----------------------------------------------------------------------------- # default values you can overwrite with documentation: # https://github.com/nickjj/ansible-whenever/#role-variables # ----------------------------------------------------------------------------- whenever_update: rails_deploy_app_name # ----------------------------------------------------------------------------- # pumacorn # ----------------------------------------------------------------------------- # default values you can overwrite with documentation: # https://github.com/nickjj/ansible-pumacorn/#role-variables # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # sidekiq # ----------------------------------------------------------------------------- # default values you can overwrite with documentation: # https://github.com/nickjj/ansible-sidekiq/#role-variables # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # nginx # ----------------------------------------------------------------------------- # default values you can overwrite with documentation: # https://github.com/nickjj/ansible-nginx/#role-variables # ----------------------------------------------------------------------------- nginx_base_domain: localhost # change this to yourdomain.com nginx_upstream_name: "{{ rails_deploy_app_name }}" nginx_upstream_server: unix://{{ rails_deploy_path }}/tmp/puma.sock nginx_root_path: "{{ rails_deploy_path }}/public" nginx_ssl_local_path: "{{ secrets_load_path }}" # ----------------------------------------------------------------------------- # monit # ----------------------------------------------------------------------------- # default values you can overwrite with documentation: # https://github.com/nickjj/ansible-monit/#role-variables # ----------------------------------------------------------------------------- monit_process_list: | check process {{ rails_deploy_app_name }} with pidfile {{ rails_deploy_path }}/tmp/{{ pumacorn_server }}.pid start program = "/etc/init.d/{{ rails_deploy_app_name }} start" stop program = "/etc/init.d/{{ rails_deploy_app_name }} stop" check process sidekiq with pidfile {{ rails_deploy_path }}/tmp/sidekiq.pid start program = "/etc/init.d/sidekiq start" stop program = "/etc/init.d/sidekiq stop"