mirror of
https://github.com/krislamo/vagrant-easyredmine
synced 2024-12-16 15:30:34 +00:00
add rake task to set some default redmine preferences
This commit is contained in:
parent
970c9aae47
commit
4becc1227b
38
roles/easyredmine/files/ebrc_settings.rake
Normal file
38
roles/easyredmine/files/ebrc_settings.rake
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
desc <<-END_DESC
|
||||||
|
Delete orphaned custom_values table rows from the database that once belonged to Projects that are now deleted. This
|
||||||
|
cleanup is needed before migrating to Easy Redmine.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
rake redmine:ebrc_settings RAILS_ENV=production
|
||||||
|
END_DESC
|
||||||
|
namespace :redmine do
|
||||||
|
task :ebrc_settings => :environment do
|
||||||
|
|
||||||
|
Setting.ui_theme = '' # Default
|
||||||
|
|
||||||
|
EasySetting.where(:name => 'hide_login_quotes').each do |setting|
|
||||||
|
setting.value = true
|
||||||
|
setting.save
|
||||||
|
end
|
||||||
|
|
||||||
|
EasySetting.where(:name => 'show_easy_resource_booking').each do |setting|
|
||||||
|
setting.value = false
|
||||||
|
setting.save
|
||||||
|
end
|
||||||
|
|
||||||
|
EasySetting.where(:name => 'show_personal_statement').each do |setting|
|
||||||
|
setting.value = false
|
||||||
|
setting.save
|
||||||
|
end
|
||||||
|
|
||||||
|
EasySetting.where(:name => :attachment_description).each do |setting|
|
||||||
|
setting.value = true
|
||||||
|
setting.save
|
||||||
|
end
|
||||||
|
EasySetting.where(:name => :attachment_description_required).each do |setting|
|
||||||
|
setting.value = false
|
||||||
|
setting.save
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
@ -59,3 +59,13 @@
|
|||||||
sudo: no
|
sudo: no
|
||||||
environment:
|
environment:
|
||||||
PATH: "{{ ansible_env.PATH }}:~/bin"
|
PATH: "{{ ansible_env.PATH }}:~/bin"
|
||||||
|
|
||||||
|
- copy: dest='/opt/easyredmine/lib/tasks/ebrc_settings.rake'
|
||||||
|
src='ebrc_settings.rake'
|
||||||
|
sudo: yes
|
||||||
|
|
||||||
|
- name: Configuring Redmine with eupath preferences
|
||||||
|
command: 'rake redmine:ebrc_settings RAILS_ENV=production'
|
||||||
|
args:
|
||||||
|
chdir: '{{ redmine_root_dir }}'
|
||||||
|
sudo: no
|
||||||
|
Loading…
Reference in New Issue
Block a user