4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'app/models/setting/default_hostgroup.rb', line 4
def self.load_defaults
return unless ActiveRecord::Base.connection.table_exists?('settings')
return unless super
Setting.transaction do
[
set('force_hostgroup_match', 'Apply hostgroup matching even if a host already has one.', false),
set('force_hostgroup_match_only_new', 'Apply hostgroup matching only on new hosts', true),
set('force_host_environment', "Apply hostgroup's environment to host even if a host already has a different one", true)
].compact.each { |s| create s.update(category: 'Setting::DefaultHostgroup') }
end
true
end
|