mirror of
https://github.com/krislamo/vagrant-easyredmine
synced 2024-12-16 07:20:36 +00:00
enable secure cookie in additional_environment.rb instead of trying to change lineinfile of application.rb
This commit is contained in:
parent
ee5e2593c9
commit
f69ec3f35c
8
roles/easyredmine/files/additional_environment.rb
Normal file
8
roles/easyredmine/files/additional_environment.rb
Normal file
@ -0,0 +1,8 @@
|
||||
# EBRC custom settings.
|
||||
# This file managed by Ansible.
|
||||
|
||||
# override session_store in application.rb to set secure
|
||||
config.session_store :cookie_store,
|
||||
:key => '_redmine_session',
|
||||
:secure => true,
|
||||
:path => config.relative_url_root || '/'
|
@ -63,10 +63,19 @@
|
||||
register: installer_run
|
||||
become: no
|
||||
|
||||
- copy: dest='/opt/easyredmine/lib/tasks/ebrc_settings.rake'
|
||||
- name: install ebrc_settings.rake
|
||||
copy: dest='/opt/easyredmine/lib/tasks/ebrc_settings.rake'
|
||||
src='ebrc_settings.rake'
|
||||
owner='{{ redmine_owner }}'
|
||||
become: yes
|
||||
|
||||
- name: install additional_environment.rb
|
||||
copy: dest='/opt/easyredmine/config/additional_environment.rb'
|
||||
src='additional_environment.rb'
|
||||
owner='{{ redmine_owner }}'
|
||||
become: yes
|
||||
notify: restart nginx
|
||||
|
||||
- name: restrict config permissions
|
||||
file: path='{{ redmine_root_dir }}/config'
|
||||
mode=0770
|
||||
@ -110,10 +119,3 @@
|
||||
job="({{ redmine_root_dir }}/script/redmine_fetch_changesets 2>&1 | sed '/install RDoc/d') >> {{ redmine_root_dir }}/log/redmine_fetch_changesets"
|
||||
user='{{ redmine_owner }}'
|
||||
become: yes
|
||||
|
||||
- name: set session cookie as secure
|
||||
lineinfile: >
|
||||
dest='{{ redmine_root_dir }}/config/application.rb'
|
||||
regexp='^\s*config.session_store'
|
||||
line=" config.session_store :cookie_store, :key => '_redmine_session', :secure => true"
|
||||
notify: restart nginx
|
||||
|
Loading…
Reference in New Issue
Block a user