Add support for memcache

This commit is contained in:
Andrea Dell'Amico 2021-07-12 15:43:26 +02:00
parent 7755ab7dcd
commit e657c07b9f
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
4 changed files with 14 additions and 3 deletions

View File

@ -21,7 +21,9 @@ redmine_inst_dir: redmine
redmine_create_application_user: True
redmine_user: redmine
redmine_group: '{{ redmine_user }}'
redmine_memcached: True
redmine_memcache_hosts:
- 'localhost:11211'
# Ubuntu 14.04: install ruby from a ppa to get a newer version
redmine_trusty_ruby_repo: 'ppa:brightbox/ruby-ng'
trusty_ruby_version: 2.3

View File

@ -25,5 +25,10 @@ dependencies:
version: master
name: nginx
state: latest
- src: git+https://gitea-s2i2s.isti.cnr.it/ISTI-ansible-roles/ansible-role-memcached.git
version: master
name: memcached
state: latest
when: redmine_memcached

View File

@ -113,8 +113,8 @@
- name: Install the additional environment file
template: src=redmine_additional_environment.rb.j2 dest=/{{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}/config/additional_environment.rb owner=root group={{ redmine_group }} mode=0440
notify:
- Reload unicorn when needed
notify: Reload unicorn
tags: [ 'redmine', 'redmine_additional_env' ]
- name: Install the gems required by redmine
shell: cd {{ redmine_glob_root_dir }}/{{ redmine_inst_dir }}; bundle install --without development test sqlite mysql && touch {{ redmine_glob_root_dir }}/.{{ redmine_inst_dir }}_gems_installed

View File

@ -1,3 +1,7 @@
config.action_controller.allow_forgery_protection = false
config.log_level = :{{ redmine_log_level }}
{% if redmine_memcached %}
config.cache_store = :mem_cache_store, {% for h in redmine_memcache_hosts %}"{{ h }}"{% if not loop.last %}, {% endif %{% endfor %}
{% endif %}